Jump to content
IGNORED

I cannot for the life of me figure out why this code won't compile


ThatDude

Recommended Posts

Edit: Nevermind. The problem was with the = 1 that somehow got after the joy0fire statement on the second-last line. How did it get there? I don't know.

 

 

 

Does anyone have any idea where I messed up?

 

This program used to compile and run, but ever since I tried to make the reset switch work it stopped compiling, even after I removed the offending code... :?

The alleged syntax error is in a different place every time I try to compile the program. Usually it's either at the start of the first line, or the end of the last line.

 

Here is the code attached: predator.bas

Here it is in code tags:

 rem batari Basic Program
 rem created 8/06/2014 1:59:51 PM by Visual bB Version 1.0.0.554
 set kernel_options pfcolors no_blank_lines
 set romsize 8kSC
 pfcolors:
 $AE
 $AC
 $AA
 $A8
 $A6
 $A4
 $A2
 $A0
 $2A
 $28
 $24
end
 playfield:
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXX............XXXXXXXXXX
 XXXXXXXXXX............XXXXXXXXXX
 XXXXXXXXXX............XXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
AtariLogo
 player0:
 %00100001
 %01010010
 %10001010
 %10001010
 %10001001
 %00000000
 %11100001
 %00010001
 %00001001
 %00001001
 %00000101
 %00000101
 %00000101
 %00000101
 %00000101
 %00000101
end
 player1:
 %11000110
 %00000001
 %00000110
 %00001000
 %11000110
 %00000000
 %00001110
 %00010000
 %00100000
 %00100000
 %01000000
 %01000000
 %01000000
 %01000000
 %01000000
 %01000000
end
 COLUBK = $00
 var0 = 0
 var1 = 0
 var3 = 0
draw_loop
 if var3 = 1 then gosub changesprites1
 if var3 = 3 then gosub changesprites2
 if var0 = 0 then gosub logos
 if var0 = 1 then gosub titlehold
 drawscreen
 goto draw_loop
logos
 if var1 < 12 then var2 = var1
 if var3 = 0 then if var1 = 12 then AUDV0 = 4
 if var3 = 0 then if var1 = 12 then AUDC0 = 4
 if var3 = 0 then if var1 = 12 then AUDF0 = 7
 if var3 = 0 then if var1 = 12 then AUDV1 = 4
 if var3 = 0 then if var1 = 12 then AUDC1 = 2
 if var3 = 0 then if var1 = 12 then AUDF1 = 5
 if var3 = 0 then if var1 = 14 then AUDV0 = 0
 if var3 = 0 then if var1 = 14 then AUDC0 = 0
 if var3 = 0 then if var1 = 14 then AUDF0 = 0
 if var3 = 0 then if var1 = 14 then AUDV1 = 0
 if var3 = 0 then if var1 = 14 then AUDC1 = 0
 if var3 = 0 then if var1 = 14 then AUDF1 = 0
 if var1 = 87 then if var3 = 4 then var2 = 0
 if var1 = 87 then if var3 = 4 then var0 = 1
 if var1 = 87 then if var3 = 4 then return
 if var1 = 87 then var2 = 11
 if var1 = 88 then var2 = 10
 if var1 = 89 then var2 = 9
 if var1 = 90 then var2 = 8
 if var1 = 91 then var2 = 7
 if var1 = 92 then var2 = 6
 if var1 = 93 then var2 = 5
 if var1 = 94 then var2 = 4
 if var1 = 95 then var2 = 3
 if var1 = 96 then var2 = 2
 if var1 = 97 then var2 = 1
 if var1 = 98 then var2 = 0
 if var1 = 99 then var3 = var3 + 1
 if var1 = 99 then var1 = 0
 if var1 = 99 then var2 = 0
 player0x = 75
 player0y = 35
 player1x = 83
 player1y = 35
 COLUP0 = var2
 COLUP1 = var2
 var1 = var1 + 1
 return
changesprites1
 player0:
 %11101110
 %10001010
 %11101110
 %00101000
 %11100110
 %00000000
 %11100111
 %10010101
 %10010101
 %11100000
 %00000000
 %01001010
 %01001010
 %01001110
 %01001000
 %11101000
end
 player1:
 %01100100
 %10101010
 %10101010
 %10101010
 %01100100
 %00000011
 %01110100
 %01010111
 %01110101
 %00010010
 %00000000
 %11010100
 %10100100
 %11101110
 %00000100
 %00000000
end
 var3 = 2
 return
changesprites2
 player0:
 %10001000
 %10001000
 %10001110
 %11100000
 %10100000
 %11100000
 %00000000
 %11111011
 %10101010
 %10101011
 %10101000
 %00000000
 %11101010
 %10101010
 %10101110
 %10100000
end
 player1:
 %01100111
 %10000101
 %11100111
 %10010001
 %01100001
 %00000000
 %00000000
 %10100100
 %10100100
 %01110111
 %00100000
 %00000000
 %11101000
 %10101000
 %11101110
 %00100000
end
 var3 = 4
 return
titlehold
 player0x = 75
 player0y = 35
 player1x = 83
 player1y = 35
 COLUP0 = $0A
 COLUP1 = $0A
 if joy0fire = 1 then var0 = 2
 return

Thanks :)

Edited by ThatDude
Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...