Computer Science Canada

help on the getch command just need some info

Author:  Leiak [ Sun Jan 18, 2004 9:43 pm ]
Post subject:  help on the getch command just need some info

when u use the getch command and lets say put getch(a) then a would be the variable to put if a = this then this happens correct? im just wondering cause it didnt work on my one part of my game not sure wut was wrong but i deleted the code for it i shud of posted it on here to see wut was wrong with it

Author:  McKenzie [ Sun Jan 18, 2004 9:49 pm ]
Post subject: 

The best way to handle commands you are not sure about is make a small test program. You say when you tried getch it didn't work (I will not try to debug code that no longer exists) well it was probably something else in your code. So to help you understand make a small program like:
var ch:string(1)
if ch = "x" then
    put "x hit"
    put ch," is not x"
end if

once you are sure the command works the way you think it does add it to your main program.

Author:  Leiak [ Mon Jan 19, 2004 9:36 am ]
Post subject: 

ahhh thx ill try in the process of trying to make a text based rpg at home so i need to figure out some commands to use to choose different storylines etc so far imnot very good at it Embarassed but for a first time program im doing good i guess