@MEE
Your approach is a little off. Avoid using suspend for key and inkey$() as your inpout detection method. An alternative is to use a repeat loop until your input choices are met:
repeat
text 0,0,"Press y or n"
choice$=lower$(inkey$())
until choice$="y" or choice$="n"
Also avoid using print if you can. TEXT is much better and it allows the use of different fonts. Here's a version of the code you posted using the repeat loop
do
rem program stuff going on
rem blah blah
rem check for f2 key
if keystate(60)=1
gosub _save_routine
else
rem do something else
text 0,0,"Waiting for F2 key..."
endif
loop
_save_routine:
repeat
text 300,400,"are you sure you want to save? (Y)/(N)"
choice$=lower$(inkey$())
until choice$="y" or choice$="n"
if choice$="y"
set cursor 300,440
input "Please Enter File Name : ";static$
rem check if file exists, give any aditional options
rem save file
text 300,460,"File "+static$+" was saved successfully"
else
text 300,460,"LEVEL NOT SAVED !!!"
endif
return
Enjoy your day.