Pong Menu
Author |
Message |
coolest35
|
Posted: Mon Jan 19, 2004 11:08 pm Post subject: Pong Menu |
|
|
Hi 8) , i have put together a menu + options + credits and extra stuff 8) like that, the all the turing files are attached, i am trying to take the game from one file and trying to put it as a procedure in the main menu file, but some error comes up , i would like to know what is causing this error and how i can fix it , and i would also appreciated if some one gave me a hint on how to error proof the menu. I would also appreciated if anyone whould give me a hint on how i can record the persons high score, i have tried this before but the score that's being written to the .txt file keeps on getting replaced.
Any help would be much appreciated,
thanx
unknow dude
Description: |
The files are all attached, hope fully i did n't for get. |
|
Download |
Filename: |
ALLFILES.zip |
Filesize: |
139.27 KB |
Downloaded: |
251 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Tue Jan 20, 2004 8:27 pm Post subject: (No subject) |
|
|
well if u use "include filename.t", when it gets to that line it will run all the code in that file and then come back to the one you are in. if there are procuders or varbiles decalred in it thous are add to the progame and can be accesed affter the include line.
for error profe menu with numbers only you can simply test if inputed num > minnum and num < maxnum. to check for if they put in a string insted of a num you can 1st take the input as a sting then do this:
code: |
if strintok(tempNum) then %where tempNum is real string that should be a num
realNum = strint(tempNum) %where realNum is an int
else
put "error you did not put in a num"
end if
|
strintok checks to see if it can chage a string to a int and strint chages it to a int
|
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
|
|