What line gives the error? BUTTON(0,1) might give an error if you are not connected to another system. Also, instead of @NMOV ... GOTO @NMOV do: WHILE 1 ... WEND