Jump to content
IGNORED

Syntax error?


Jr. Pac

Recommended Posts

I keep getting syntax errors in this code. I have no idea why. I marked the places with an error with an [error] sign.

rem Generated 7/24/2011 2:17:33 PM by Visual bB Version 1.0.0.554

rem **********************************

rem *<filename> *

rem *<description> *

rem *<author> *

rem *<contact info> *

rem *<license> *

rem **********************************

 

 

playfield:

XXXXXXX.XXXXXX.XXXXXXXX.........

X.....X.XXXXXX.X......X.........

X.XXX............X.XX.X.........

X...X.X.X.XXXX.X.X....X.........

X.X...X...X..X.X...XX.X.........

X.XXX.XXX.X....XXX.XX.X.........

X.X...X...X..X.X...XX.X.........

X...X.X.X.XXXX.X.X....X.........

X.XXX............X.XX.X.........

X.....X.XXXXXX.X......X.........

XXXXXXX.XXXXXX.XXXXXXXX.........

end

 

COLUBK=$00

COLUPF=$58

player0x=50:player0y=50

player1x=20:player1y=20[error]

player0:

%00000010

%01111101

%11110110

%10111010

%11101110

%11101110

%01000100

%00000000

end

 

player1:

%11111110

%01110111

%11100011

%01101011

%01111111

%11110111

%01100011

%11101010

end

 

draw_loop

drawscreen

goto draw_loop

[error]

 

Edit: BAS file added

default.bas

Edited by Jr. Pac
Link to comment
Share on other sites

Nope. Not that.

Yep definitely that. None of these were indented

 

COLUBK=$00
COLUPF=$58
player0x=50:player0y=50
player1x=20:player1y=20

 

-Jeff

I accidentally erased the indents foor the COLUBK and COLUPF. Is that all that needs to be indented?

Link to comment
Share on other sites

Nope. Not that.

Yep definitely that. None of these were indented

 

COLUBK=$00
COLUPF=$58
player0x=50:player0y=50
player1x=20:player1y=20

 

-Jeff

I accidentally erased the indents foor the COLUBK and COLUPF. Is that all that needs to be indented?

Your player statements (as above) were not indented. It compiled after that.

 

-Jeff

Link to comment
Share on other sites

Now the colors on the sprites will only stay colored (not black) for one frame!

Because you don't have COLUP0 and COLUP1 inside your main loop:

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#colup0

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#ephvarreg

 

 

jr_pac_2011y_07m_24d_2018t.bas

Edited by Random Terrain
Link to comment
Share on other sites

Now the colors on the sprites will only stay colored (not black) for one frame!

You need to put COLUP0 and COLUP1 inside the loop, before the drawscreen command, because batari Basic changes COLUP0 and COLUP1 to the scorecolor at the bottom of every frame. If you had set scorecolor to something (instead of leaving it black), you'd have found that the sprites retained their colors for one frame, then changed to the scorecolor for subsequent frames. So putting COLUP0 and COLUP1 inside the loop, just before drawscreen, ensures that the sprite colors get set to the desired values before each frame is drawn.

 

Michael

Link to comment
Share on other sites

Now to the controls... That's not going to be any fun. When you press up, I need the player to go left. etc. This game was designed for your television to be turned on its side.

Link to comment
Share on other sites

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...