Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
When I try to get my program to do something with a keypress it quits
Here's the code I have that's been giving me the problem:
PRINT "1. Play solo"
PRINT "2. Play with one friend (coming soon)"
PRINT "3. Play with two friends (also coming soon)"
PRINT "4. Get outta here"
IF INKEY$ = CHR$(128) + CHR$(2) THEN CALL solo
IF INKEY$ = CHR$(128) + CHR$(3) OR INKEY$ = CHR$(128) + CHR$(4) THEN
PRINT "Sorry, cannot do that"
IF INKEY$ = CHR$(128) + CHR$(5) THEN CALL ending
LOOP WHILE INKEY$ = ""
a = INT((12 - 6 + 1) + RND * 6)
PRINT "Right now you hope to get the"
PRINT "most money out of your given spins."
I imcluded the first several lines so that you won't get an error message from it.
0 · ·