It's the if with out then statement
this would work but you need to replace the statments after then with your own depending on what you want to do.
if upkey()=1 then inc y
if downkey()=1 then dec y
if leftkey()=1 then inc x
if Rightkey()=1 then dec y
From the dbpro help
IF
This command will allow your program to perform a sequences of commands based on the result of a condition. If the condition is true, the commands after the THEN keyword are performed. Ensure that your
commands after the THEN keyword are separated by a colo. If the condition is false, the rest of the line is skipped.
Beaten by a minute