Computer Science Canada program problem |
Author: | nin [ Thu Jan 11, 2007 8:22 pm ] | ||
Post subject: | program problem | ||
Everything that i want the program to do is working, but the only problem is that the display won't show when the user guess the number too high or too low. Also another problem is that it just stops when the you enter your first try. It is suppose to make the user guess between the numbers 10 and 65, three times and in between if your guess is wrong it will tell you wether your guess is too high or too low. Also, when you guess a number that is <10 or >65, the errortrap will show. (that is worksing properly) * The exit button is working properly just how i want it * The menu button and other process are working except for the problem that was mentioned above. ______________________________________________________________________________________
|
Author: | Ultrahex [ Thu Jan 11, 2007 9:30 pm ] |
Post subject: | Re: program problem |
Well those are procedures not processes for one thing just to get terminology correct. First of all, there is nothing in order to make it so it runs three times (as in guess three times) in your code, an attempt at all would be nice so i can see where you are having trouble implementing it. Also the same for your too high and too low, you need to check whether or not it is too high after each number or it is the number, this can be done doing if statements, it is relativity simple. Hope this helps. |
Author: | nin [ Thu Jan 11, 2007 9:36 pm ] |
Post subject: | Re: program problem |
Ultrahex @ Thu Jan 11, 2007 9:30 pm wrote: Also the same for your too high and too low, you need to check whether or not it is too high after each number or it is the number, this can be done doing if statements, it is relativity simple. Hope this helps. i did the if structures already n for the code that makes the program exits wen the user have 0 tries left was already in my code but i dont noe y it isnt working? |
Author: | Ldomi [ Thu Jan 11, 2007 9:49 pm ] |
Post subject: | Re: program problem |
It probably didn't work because you didnt tell the program to go to display after userinput. Try putting display in the userinput procedure (after end if) and put the display procedure before the userinput procedure so that it will run. (And get rid if the cls's, you dont need them) I think im in your class btw |
Author: | nin [ Thu Jan 11, 2007 9:55 pm ] |
Post subject: | Re: program problem |
Quote: I think im in your class btw
i am in ur class lucille =P n thanks it works =) just need to edit it a little now k! thank you soo much =P |
Author: | nin [ Thu Jan 11, 2007 9:58 pm ] | ||
Post subject: | Re: program problem | ||
k this is the code now: n there is a little bit more proplem the program doesnt run again =/
|
Author: | Ldomi [ Thu Jan 11, 2007 10:05 pm ] |
Post subject: | Re: program problem |
try adding a mainMenuBtn in the display so that it will go back to the main menu and let the user play again. |
Author: | nin [ Thu Jan 11, 2007 10:10 pm ] | ||
Post subject: | Re: program problem | ||
is it suppose to be like this?
|
Author: | Ldomi [ Thu Jan 11, 2007 10:20 pm ] |
Post subject: | Re: program problem |
yeah, something like that. Now just fix your tries (cause it always says u have 2 tries left). |
Author: | Ldomi [ Thu Jan 11, 2007 10:23 pm ] |
Post subject: | Re: program problem |
Oh, and fix up your code so that you shouldn't have to use cls. |