Argghhh! Sorry that's what I get for not testing it in the compiler. There were a few typos and mistakes I made. Sorry About that. In order to make ammends I improved the code a little. And this time it works! You no longer have to press enter for your choice. Just press the key. It will then tell you which action was processed. You can test the other entries by clicking the left mouse button.
the upper$( <string> ) command forces the case to uppercase. This way it doesn't matter if the user has caps lock on/off.
sync on
sync rate 0
hide mouse
`-------------------- Select screen -------------------------------
StartPrompt:
cls
clear entry buffer
center text 200, 400, "[N]ew Game"
center text 330, 400, "[L]oad Game"
center text 450, 400, "[E]xit Game"
sync
Select upper$(INKEY$())
Case "N": gosub NewGameInit : EndCase
Case "L": gosub LoadGameInit: EndCase
Case "E": Gosub Quit: Endcase
Case default: Goto StartPrompt :Endcase
EndSelect
gosub main
wait key
end
`------------------------------------------------------------------
`Game typr initialization
NewGameInit:
`new game initialization code
test$="newgame was processed"
gosub main
return
LoadGameInit:
`Load game initialization
test$="load game was processed"
return
quit:
`cleanup resources
test$="quit was processed - press any key"
print test$
sync
wait key
end
return
`****************** Main Game Loop
main:
do
`cls
text 10,20,">"+test$
if mouseclick()=1
goto StartPrompt
endif
sync
loop
return
`****************** END of Main Game Loop