Hi all.
Im trying to create an own input function, and it works quite good. But there is one problem: When you try to erase text, it will do it but sometimes it just stop and do nothing. I use this code to erase text:
if keystate(14)=1 then s$=left$(s$,len(s$)-1) : wait 50
. And I dont understand why, it should work. But it doesnt. What is wrong?
sync on : sync rate 60
global s$ as string
st$ as string
do
cls
st$=_input(10,10,"Input text: ")
text 10,100,st$
sync
loop
function _input(x as integer,y as integer,txt as string)
retst$ as string
s$=s$+entry$()
clear entry buffer
rem This is the line that doesnt work correctly
if keystate(14)=1 then s$=left$(s$,len(s$)-1) : wait 50
text x,y,txt+s$
if returnkey()=1
retst$=s$
s$=""
endif
endfunction retst$