ydcl Posted March 31, 2014 Share Posted March 31, 2014 Hi all, I'm currently learning BatariB and have been trying to do a very very simple game. I run into this error when putting player and enemy position: I managed to get the background correct and it runs. 2600 Basic compilation completed.Compilation completed at 3/31/2014 7:24:45 PMview output file:///C:/Users/YLS/Desktop/YANLUZSOFTWARE/Yan's Revenge/bin[3/31/2014 7:24:54 PM] saving C:\Users\YLS\Desktop\YANLUZSOFTWARE\Yan's Revenge\default.bas succeeded.Compile started at 3/31/2014 7:24:55 PMCompiling C:\Users\YLS\Desktop\YANLUZSOFTWARE\Yan's Revenge\default.bas2600 Basic compilation failed!LINE --> missile0y = missile0y - 2 : goto draw_loop I've attached the default.bas file if anyone wants to look at it. Also would love to know how to do a title screen as I have not seen a youtube video on it yet. Thanks, Yan default.bas Quote Link to comment Share on other sites More sharing options...
bogax Posted March 31, 2014 Share Posted March 31, 2014 Hi all, I'm currently learning BatariB and have been trying to do a very very simple game. I run into this error when putting player and enemy position: I managed to get the background correct and it runs. 2600 Basic compilation completed. Compilation completed at 3/31/2014 7:24:45 PM view output file:///C:/Users/YLS/Desktop/YANLUZSOFTWARE/Yan's Revenge/bin [3/31/2014 7:24:54 PM] saving C:\Users\YLS\Desktop\YANLUZSOFTWARE\Yan's Revenge\default.bas succeeded. Compile started at 3/31/2014 7:24:55 PM Compiling C:\Users\YLS\Desktop\YANLUZSOFTWARE\Yan's Revenge\default.bas 2600 Basic compilation failed! LINE --> missile0y = missile0y - 2 : goto draw_loop I've attached the default.bas file if anyone wants to look at it. Also would love to know how to do a title screen as I have not seen a youtube video on it yet. Thanks, Yan That line is not indented lines 24..26 are not indented either everything (I think) except labels and "end" needs indenting. 1 Quote Link to comment Share on other sites More sharing options...
ydcl Posted March 31, 2014 Author Share Posted March 31, 2014 That line is not indented lines 24..26 are not indented either everything (I think) except labels and "end" needs indenting. Indenting means pressing the space bar once? Quote Link to comment Share on other sites More sharing options...
bogax Posted March 31, 2014 Share Posted March 31, 2014 (edited) Indenting means pressing the space bar once? Yes, once or more. Also labels and "end" need to not be indented that is they need to be un-indented Actually, I suppose technically I should say the first column should be a space while labels and "end" need to start in the first column. (it could be argued that if everything has a space and starts in the second column, then technically none of it is indented or if labels all start in the second column and everything else in the third column the labels aren't indented. But it wouldn't compile) Edited March 31, 2014 by bogax Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted April 1, 2014 Share Posted April 1, 2014 Related link: randomterrain.com/atari-2600-memories-batari-basic-commands.html#indent 1 Quote Link to comment Share on other sites More sharing options...
ydcl Posted April 1, 2014 Author Share Posted April 1, 2014 I've been trying to figure out what's wrong with the indentation. I'll read the link tomorrow when I start again. It was working fine until this line gave me problems. missile0y=missile0y-2: goto draw_loop that is were the system is telling me the error is. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted April 1, 2014 Share Posted April 1, 2014 Here's a working version of your program with everything indented properly and errors fixed and a few adjustments: ydcl_2014y_03m_31d_2216t.bas ydcl_2014y_03m_31d_2216t.bin 2 Quote Link to comment Share on other sites More sharing options...
bogax Posted April 1, 2014 Share Posted April 1, 2014 (edited) This compileslines 24..26 have spaces in the names that don't belong.(fixed here) rem Generated 3/31/2014 4:07:41 PM by Visual bB Version 1.0.0.558 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end player0x=50:player0y=50 player1x=20:player1y=20 missile0height=4:missile0y=255 NUSIZ0=16 sprites player0: %01000100 %00101000 %00010000 %00010000 %01111100 %00010000 %00111000 %00111000 end player1: %00100100 %00100100 %00100100 %00100100 %11111111 %00011000 %00111100 %00011000 end if missile0y>240 then goto skip missile0y=missile0y-2:goto draw_loop skip if joy0fire then missile0y=player0y-2:missile0x=player0x+4 COLUBK = $40 COLUPF = $1E draw_loop drawscreen goto sprites edit forgot the forum likes to eat spaces yan.bas Edited April 1, 2014 by bogax 2 Quote Link to comment Share on other sites More sharing options...
ydcl Posted April 1, 2014 Author Share Posted April 1, 2014 Thank you both! Now I gotta read more into Randoom Terrains how to make the character move. after some reading I'll try messing with it again for the movement and hopefully a title screen. Quote Link to comment Share on other sites More sharing options...
ydcl Posted April 1, 2014 Author Share Posted April 1, 2014 Can someone point me to the exact location for the collision section between missile/enemy and missile player of randomterrain.com? I can move and shoot but I seem to be messing up the collision. This is the code I have for the collision. the program compiles fine as long as I don't type this in. if collision (missile0,player1)then score = score+1 : player1x = rand / 2 : player1y = 0 : missile0y = 255 if collision (player0,player1)then score = score-1 : player1x = rand / 2 : player1y = 0 : missile0y = 255 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted April 1, 2014 Share Posted April 1, 2014 It's a good idea to copy and paste any code that you want to modify so it will be harder to introduce errors: randomterrain.com/atari-2600-memories-batari-basic-commands.html#collision You're not supposed to have a space after collision. Instead of "collision (" you should have "collision(". 1 Quote Link to comment Share on other sites More sharing options...
ydcl Posted April 1, 2014 Author Share Posted April 1, 2014 Ok, I downloaded one of your collision examples. 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.