For some reason when I try to run this code, it says: "Command out of place at line 26."
Here is my Code
load object "robot.x",1
make object sphere 2,2
Health = 50
sync rate 60
sync on
set global collision on
do
if leftkey()>0 then move object left 1,0.1
if rightkey()>0 then move object right 1,0.1
if upkey()>0 then move object up 1,0.1
if downkey()>0 then move object down 1,0.1
if object collision(1,2)<>0
Health=Health-1
print Health
endif
if Health = 0
print "Game over!"
endif
if Health < 0 then Health = 0
endif
sync
loop