Computer Science Canada

Include command problems

Author:  who cares? [ Sun Dec 28, 2003 8:27 am ]
Post subject:  Include command problems


I'm trying to make a game and I am using the include command. I am declaring all the variables/procedures in the "main" program and i am using some of them in the subprogram. However, I get a message in the subprogram that says that one of the procedures that i have declared in the main program does not exist. I have made another program in the past that I have used this technique in and it worked. I checked everything that might be wrong with it and I can't find a thing. Can anyone please advise as to what might be wrong with my program? Maybe someone else has run into this problem before. Thank you very much.

Author:  Mazer [ Sun Dec 28, 2003 9:52 am ]
Post subject: 

could you upload the files (or pm them to me) so i can see what's wrong?

Author:  Tony [ Sun Dec 28, 2003 1:06 pm ]
Post subject: 

it might be your positioning. You treat include like if all the code is copied from the file and pasted in that spot. So the procedure used should be decleared before the include statment.

Author:  who cares? [ Sun Dec 28, 2003 3:14 pm ]
Post subject:  Thanks!

Thanks a lot! That was it!