From "Instructions" to Main Menu to UserInput1
Author |
Message |
shakin cookie
|
Posted: Wed Jan 02, 2008 1:59 pm Post subject: From "Instructions" to Main Menu to UserInput1 |
|
|
Hey everyone, there is a bit of difficulty i have run into with the game i am making.
I have a main menu, and when instructions is selected( a 4 is entered,) there is a program pause and then main menu. Now, none of the options work.
Here is my main program: mainMenu
userInput1
i suspect that there is something i have to do with a loop but i cannot figure it out...
Description: |
|
Download |
Filename: |
Unnamed.t |
Filesize: |
2.9 KB |
Downloaded: |
137 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Zampano
|
Posted: Wed Jan 02, 2008 2:43 pm Post subject: Re: From "Instructions" to Main Menu to UserInput1 |
|
|
The reason userinput1 does not occur more than once is that it is only called once (in the last line of the program). Therefore when the program first begins to run, introduction, then mainMenu, and finally userInput1 run. However, when you are calling those same procedures from inside the "elsif choice = 4" section of userinput1, you only call MainMenu, not userInput1, meaning that only mainMenu will execute. What you should do is call them both at once instead of only the one. The problem has absolutely nothing to do with any sort of loop.
On another note, you might want to compress some of those procedures into a lesser amount so that the code is easier to understand. For example, mainMenu and userInput1 never execute without being beside each other so their being in seperate procedures is pretty redundant. You might also want to eliminate pauseProgram in favour of Input.Pause. Lastly, please name userinput1 'userinput2' (because that's what it is) and mainMenu 'userinput1'.
|
|
|
|
|
|
shakin cookie
|
Posted: Wed Jan 02, 2008 2:57 pm Post subject: RE:From "Instructions" to Main Menu to UserInput1 |
|
|
thank you zampano
i will try these things
|
|
|
|
|
|
|
|