set kernel_options playercolors player1colors
dim zombiewalk=a
dim zombiewalk2=b
dim zombiewalkdelay=c
dim zombiewalk2delay=d
dim zombiespeed=e
dim ballwasshot=f
CTRLPF=$21
playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
player0:
%1101100
%0100100
%0100100
%0100100
%0100100
%0010100
%0001000
%0001011
%1111111
%1111111
%0101010
%0011100
%0001000
%0011100
%0100010
%1000001
%1000001
%1000001
%0100010
%0011100
end
player1color:
$F0
$F0
$F0
$F0
$F0
$F0
$F4
$F4
$F4
$F4
$F4
$F4
$F4
$F4
$C4
$C4
$C4
$C4
$C4
$C4
end
player1:
%00011001
%00010010
%00010010
%00010010
%00011110
%00010000
%00011110
%10011100
%10011000
%10111101
%10111101
%10111001
%01111110
%00011100
%00011110
%00110001
%00111111
%00110101
%00111111
%00011110
end
COLUBK=6
COLUPF=244
player0x=138
player0y=79
player1x=17
player1y=79
zombiespeed=20
ballheight=1
ballx=139
bally=71
ballwasshot=0
loop
drawscreen
player1:
%00011001
%00010010
%00010010
%00010010
%00011110
%00010000
%00011110
%10011100
%10011000
%10111101
%10111101
%10111001
%01111110
%00011100
%00011110
%00110001
%00111111
%00110101
%00111111
%00011110
end
if zombiewalk=1 then player1:
%01100110
%01000100
%00100100
%00100100
%00011000
%00010000
%00011110
%10011100
%10111000
%10111010
%10111010
%10111010
%01111110
%00011100
%00011110
%00110001
%00111111
%00110101
%00111111
%00011110
end
if switchreset then reboot
if joy0left then player0x=player0x-1
if joy0right then player0x=player0x+1
if !joy0fire && !ballwasshot then ballx=player0x+1
if joy0fire then ballwasshot=1
if ballwasshot then ballx=ballx-2
if player0x>138 then player0x=138
if player0x<16 then player0x=16
if player1x>138 then player1x=138
if collision(ball,player1) then player1x=16:ballx=player0x+1:ballwasshot=0:score=score+1
zombiewalkdelay=zombiewalkdelay+1
if zombiewalkdelay=zombiespeed then zombiewalk=zombiewalk+1:zombiewalkdelay=0:player1x=player1x+1
if zombiewalk=2 then zombiewalk=0
goto loop
The code was compiling and executing fine a while ago, but now, wherever I place my cursor, there is a syntax error there.
Any tips?