Computer Science Canada Order of Procedures? |
Author: | Badsniper [ Wed May 11, 2011 9:43 pm ] | ||
Post subject: | Order of Procedures? | ||
What is it you are trying to achieve? I am trying to get my game to loop back to my menu if a certain character is pressed What is the problem you are having? The procedures will not allow this to happen because one is declared before another Describe what you have tried to solve this problem I've switched around my procedures a few times, but it didn't help. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using 4.1.1 I believe... (?) |
Author: | Insectoid [ Wed May 11, 2011 10:00 pm ] |
Post subject: | RE:Order of Procedures? |
The issue here is that even if you *could* do it this way (well, you can, but I won't tell you how), your program will constantly use up more ram. The program starts inside MENU. Now, let's say you click 'start game'. You now have an instance of GAME_COMPONENT running inside MENU. If you then finish the game and return to the menu, you'll have a menu running inside the game procedure, running inside another menu procedure. Instead of calling menu from GAME_COMPONENT, return to the menu by ending the GAME_COMPONENT procedure. |
Author: | tyuo9980 [ Thu May 12, 2011 8:57 pm ] |
Post subject: | Re: Order of Procedures? |
what i do is run the menu as the main program, not a procedure. so then after ur game ends or whatever just exit the loop in ur procedure and itll return back to the menu. |