Don't use the
input command

Use the entry buffer:
rem setup screen
sync on
sync rate 60
backdrop on
color backdrop 0
rem state variable so you know which state you're in
global state as integer
state = 1
rem entry variable (is used by the whole entry code)
global Entry as EntryVT
rem clear the buffer
ClearBuffer()
rem main loop
do
rem player's bid
if state = 1
rem text to help
text 0 , 0 , "What is the player's bid?"
text 0 , 20 , Entry.ThisEntry$
rem get entry
ProcessBuffer()
rem return key means the player has entered something
if returnkey()
rem get the value entered and clear the buffer
n = val( Entry.ThisEntry$ )
ClearBuffer()
rem next state (next player's turn perhaps?)
state = 2
endif
rem control key is pressed
if controlkey() then state = main_menu
endif
rem main menu...
if state = main_menu
rem do the main menu stuff here
endif
rem refresh screen
sync
rem end of main loop
loop
rem end
end
rem -------------------------------------
rem entry buffer control
rem -------------------------------------
type EntryVT
Buffer$ as string
ThisEntry$ as string
endtype
function ProcessBuffer()
rem local variables
local n as integer
local tmp$ as string
rem get entry
Entry.Buffer$ = entry$()
clear entry buffer
rem process each character seperately
for n = 1 to len( Entry.Buffer$ )
rem get next character
tmp$ = mid$( Entry.Buffer$ , n )
rem backspace
if asc( tmp$ ) = 8
Entry.ThisEntry$ = left$( Entry.ThisEntry$ , len( Entry.ThisEntry$ ) - 1 )
endif
rem any other characters
if asc( tmp$ ) > 31
Entry.ThisEntry$ = Entry.ThisEntry$ + tmp$
endif
next n
endfunction
function ClearBuffer()
rem clear
clear entry buffer
Entry.ThisEntry$ = ""
endfunction
TheComet