I recommend you to modify IF statements as follows. IF(BUTTON(0)AND #UP)!=0 THEN The same is true of #DOWN, #LEFT and #RIGHT.