gHan2000 Posted February 6, 2011 Share Posted February 6, 2011 I finally got my batari Basic working, so now I started coding. For some reason, when I compiled and tested my game, it just got a pure black screen. I coded this out: playfield: …............................ …............................ …............................ …............................ …............................ …............................ …............................ …............................ …............................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX COLUBK = 20$ COLUPF = 212 player0x=50player0y=50 player1x=20player1y=20 player0: %01111110 %01000010 %01000010 %01111110 001000 011100 001000 010100 end player1: %11111111 %10000001 %10000001 %10000001 %10000001 %10000001 %10000001 %11111111 end draw_loop drawscreen goto draw_loop Do you see any errors in it? Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 7, 2011 Share Posted February 7, 2011 It's hard to check to see if you have any indenting errors, because the forum tends to eat indents. Its easier next time to attach the file. The first thing that jumps out at me is the lines in the form "player0x=50player0y=50". You need a colon between two commands if you want them on the same line. "player0x=50:player0y=50" would work. Quote Link to comment Share on other sites More sharing options...
diogoandrei Posted February 8, 2011 Share Posted February 8, 2011 Ok, let me help you. Lots of things... 1. playfield needs and "end" command; 2. COLUBK = 20$ should be COLUBK = $20; 2. As RevEng noticed, you need a colon ":" inbetween player0x and player0y; 3. player0 needs % and two more binaries on the last 4 lines; 4. plus, the indent. Something like this: playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end COLUBK = $20 COLUPF = 212 player0x=50 : player0y=50 player1x=20 : player1y=20 player0: %01111110 %01000010 %01000010 %01111110 100000 %01110000 100000 %01010000 end player1: %11111111 %10000001 %10000001 %10000001 %10000001 %10000001 %10000001 %11111111 end draw_loop drawscreen goto draw_loop Attached you will find .bas and .bin as examples. As always, go to Random Terrain. Something weird I noticed while doing this post is that when using "Insert code snippet", when you dial "percent symbol zero zero" with no blank spaces in there the three digits are just ignored. I am using Google Chrome... is that normal? ...that's why you will find player0 to look weird in the above code. default.bas default.bas.bin Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 8, 2011 Share Posted February 8, 2011 The forum likes to eat the characters "%00". I think it's a misguided security thing. I noticed that you can add them back in if you edit the post in the non-full post editor, or you can also type in two percent characters and four zeros, and that works too. (though they get stripped if you preview the post) Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted February 8, 2011 Share Posted February 8, 2011 That's why it's easier for everybody to just attach a file. You don't have to worry about the forum raping your code. 1 Quote Link to comment Share on other sites More sharing options...
gHan2000 Posted February 10, 2011 Author Share Posted February 10, 2011 (edited) 1. playfield needs and "end" command; I originally had an end function in the code, but when I tried compiling it it said ''Error line 12; [insert vocabulary here] end function''. Anyway, I'll try your modified version of my code. Edited February 10, 2011 by gHan2000 Quote Link to comment Share on other sites More sharing options...
jwierer Posted February 11, 2011 Share Posted February 11, 2011 For those new to bB, bblint comes in really handy for checking syntax errors like this. -Jeff 1 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.