Computer Science Canada Why doesn't my code work? |
Author: | Ldomi [ Thu Dec 28, 2006 1:55 pm ] | ||
Post subject: | Why doesn't my code work? | ||
Everytime i press the "Play Game" button, it won't allow me to input a number, instead, a new window pops up. Can someone help me?
|
Author: | Clayton [ Fri Dec 29, 2006 9:28 am ] |
Post subject: | |
Holy! There is such a thing as over commenting you know. Commenting bits of code that should not need commenting (ie procedure title: tells me pretty much exactly what it might do) should not be commented. Take a quick look at the Style Guidelines in the Turing Walkthrough for some pointers. Now on to your problem. I think it has something to do with the way you are handling the GUI. Try getting rid of the exit when GUI.ProcessEvent in your main loop (where you control everything like userInput, etc.). I have a feeling that Turing's GUI is screwing up yet again and is somehow reading true after you press a button and when you get to your main loop, exiting because of the GUI.ProcessEvent and going straight to the goodBye procedure. Try that and post back here. Oh, and take a good look at the other tutorials in the Turing Walkthrough as well, it is a valuable source of information to have. |
Author: | Ldomi [ Sat Dec 30, 2006 4:03 pm ] |
Post subject: | |
Freakman wrote: Holy! There is such a thing as over commenting you know. Commenting bits of code that should not need commenting (ie procedure title: tells me pretty much exactly what it might do) should not be commented. Take a quick look at the Style Guidelines in the <a href="http://www.compsci.ca/v2/viewtopic.php?t=8808">Turing Walkthrough</a> for some pointers.
Now on to your problem. I think it has something to do with the way you are handling the GUI. Try getting rid of the exit when GUI.ProcessEvent in your main loop (where you control everything like userInput, etc.). I have a feeling that Turing's GUI is screwing up yet again and is somehow reading true after you press a button and when you get to your main loop, exiting because of the GUI.ProcessEvent and going straight to the goodBye procedure. Try that and post back here. Oh, and take a good look at the other tutorials in the <a href="http://www.compsci.ca/v2/viewtopic.php?t=8808">Turing Walkthrough</a> as well, it is a valuable source of information to have. I just tried it, but it doesn't seem work. Thank you very much though |
Author: | Prince Pwn [ Sun Dec 31, 2006 1:37 pm ] | ||||
Post subject: | |||||
This is where your new window opens and asks for an answer:
When you click the Play Button it goes to userInput, then
Your mistake is probably somewhere within the above code. |
Author: | blade360 [ Wed Jan 03, 2007 5:31 pm ] |
Post subject: | |
ya i agree |