|
Post by mpranger on Sept 11, 2021 16:46:45 GMT -5
I'm stumped.
The code below is not intended to be a working snippet. It's an example of what I'm working with.
I use the space bar chr$(32) to tab between sections of the program.
This works exactly as intended in the LB4.51 editor but when I make a .tkn file, the program doesn't respond to the space bar.
Any ideas why?
gosub [getanykey] if whichentry$=chr$(32) then if barcount=1 then gosub [clearbetting]:goto [barcount1] if whichentry$=chr$(32) then if barcount=2 then gosub [clearbetting]:goto [barcount2] if whichentry$=chr$(32) then if barcount=3 then gosub [clearbetting]:goto [barcount3] if whichentry$=chr$(32) then if barcount=4 then gosub [clearbetting]:goto [barcount4] .... .... [getanykey] getkey$ = input$(1) whichentry$=getkey$ return
|
|
|
Post by Rod on Sept 12, 2021 2:53:49 GMT -5
Well this code works for me as a .bas or as a .tkn So you have something else going on.
while key$<>" " key$=input$(1) if key$="1" then print "1" if key$="2" then print "2" wend print "Ending" end
To debug print the length and asc value within the strings you get back from reading the keyboard.
|
|