Thanks BatVink. Maybe I'm just being dense but it still doesn't work.
Here is the code with the key change code added (although you can't enter the same letter twice at the moment).
sync on : sync rate 60
clear entry buffer
global temptext$ = ""
global text$
do : cls
detect_input()
sync : loop
function detect_input()
templetter$ = right$(entry$(),1)
if templetter$ <> right$(temptext$,1)
temptext$ = temptext$ + templetter$
templetter$ = ""
endif
text 0,0,temptext$
clear entry buffer
if returnkey()= 1
text$ = temptext$
temptext$ = ""
text 0,10,text$
if text$ = "chicken" then end
endif
endfunction
Here is the code without that check included.
sync on : sync rate 60
clear entry buffer
global temptext$ = ""
global text$
do : cls
detect_input()
sync : loop
function detect_input()
temptext$ = temptext$ + right$(entry$(),1)
text 0,0,temptext$
clear entry buffer
if returnkey()= 1
text$ = temptext$
temptext$ = ""
text 0,10,text$
if text$ = "chicken" then end
endif
endfunction
Both times the word is recognised and momentarily printed to the screen. The text$ always equals what was printed on the screen before in the temptext$, however this is never recognised by the check to make the word correct appear on the screen, or in this case end the program.
Thanks again for your help,
Mike
PS If you feel I am 'hijacking' the thread then just say and I will post a new topic in the appropriate board.
*** Formerly Code Monkey ***