Jr. Pac Posted July 24, 2011 Share Posted July 24, 2011 (edited) 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 July 24, 2011 by Jr. Pac Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 24, 2011 Share Posted July 24, 2011 This might be your problem: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#indent Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Nope. Not that. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 24, 2011 Share Posted July 24, 2011 (edited) Attach your .bas file so we're seeing exactly what you're seeing. Edited July 24, 2011 by Random Terrain Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Attach your .bin file so we're seeing exactly what you're seeing. Is .bas ok? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 24, 2011 Share Posted July 24, 2011 Attach your .bin file so we're seeing exactly what you're seeing. Is .bas ok? That's what I meant. I typed the wrong thing. Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Attach your .bin file so we're seeing exactly what you're seeing. Is .bas ok? That's what I meant. I typed the wrong thing. It's ok. I do it all the clock. 1 Quote Link to comment Share on other sites More sharing options...
jwierer Posted July 24, 2011 Share Posted July 24, 2011 Nope. Not that. Yep definitely that. None of these were indented COLUBK=$00 COLUPF=$58 player0x=50:player0y=50 player1x=20:player1y=20 -Jeff Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 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? Quote Link to comment Share on other sites More sharing options...
jwierer Posted July 24, 2011 Share Posted July 24, 2011 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 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 24, 2011 Share Posted July 24, 2011 I had to reset my computer and now I'm finally back (it takes forever). As mentioned above, all 4 lines were not indented. This works: jr_pac_2011y_07m_24d_1827t.bas Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Thanks so much. It's a secret game I'm making... Here's a few hints. Wrong way, Arcade, Pink Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 There's another syntax error now. In the title of the code. Here's the new BAS: default.bas Quote Link to comment Share on other sites More sharing options...
jwierer Posted July 24, 2011 Share Posted July 24, 2011 There's another syntax error now. In the title of the code. Here's the new BAS: Looks like the same code with the same error. Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Ugh! It didn't save the code! Quote Link to comment Share on other sites More sharing options...
jrok Posted July 24, 2011 Share Posted July 24, 2011 There's another syntax error now. In the title of the code. Here's the new BAS: You need to indent this stuff: COLUBK=$00 COLUPF=$58 player0x=50:player0y=50 player1x=20:player1y=20 Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 24, 2011 Author Share Posted July 24, 2011 Now the colors on the sprites will only stay colored (not black) for one frame! default.bas Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 25, 2011 Share Posted July 25, 2011 (edited) 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 July 25, 2011 by Random Terrain Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted July 25, 2011 Share Posted July 25, 2011 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 Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 25, 2011 Author Share Posted July 25, 2011 Thanks for the info. Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 25, 2011 Author Share Posted July 25, 2011 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. Quote Link to comment Share on other sites More sharing options...
jrok Posted July 25, 2011 Share Posted July 25, 2011 This game was designed for your television to be turned on its side. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted July 25, 2011 Share Posted July 25, 2011 This game was designed for your television to be turned on its side. ... or you could lay on your side as you play. Michael Quote Link to comment Share on other sites More sharing options...
Jr. Pac Posted July 25, 2011 Author Share Posted July 25, 2011 (edited) I'm getting MORE syntax errors. jr_pac_2011y_07m_24d_2018t.bas Edited July 25, 2011 by Jr. Pac Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted July 25, 2011 Share Posted July 25, 2011 I'm getting MORE syntax errors. I just loaded it, compiled it, ran it and got no errors. Did you attach the latest version? It looks exactly like the last version that I attached. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.