Rabbit 2600 Posted June 7, 2013 Share Posted June 7, 2013 Sorry to be a bother again, but this is one nut I can't crack. I'm experimenting and learning how pfscroll works. And I'm making a game based on an example. I've gotten most things down, but I just can't get sound to work. I go by se same formula I've used in my other games =/ Source: default.bas Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 8, 2013 Share Posted June 8, 2013 When I try to compile it, I get a compile error on this line: if collision(player0,player1) then score = score + 10 : player1x = 255 : player1y = 255 : h + 10 The error is because you say "h + 10" without setting anything equal to it-- I'm guessing you meant to say "h = h + 10"? Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 8, 2013 Share Posted June 8, 2013 Even after I fixed that error the compiler kept crashing until I split the following line into two separate lines: Before (crashes the compiler): if h > 0 then AUDV0 = 8 : AUDC0 = 6 : AUDF0 = 1 : h = h - 1 : if h = 0 then AUDV0 = 0 After (compiles okay): if h > 0 then AUDV0 = 8 : AUDC0 = 6 : AUDF0 = 1 : h = h - 1 if h = 0 then AUDV0 = 0 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted June 8, 2013 Share Posted June 8, 2013 He probably meant to use h = 10. This compiles for me using the version of batari Basic in the bBWin7_64bit.zip file: if h > 0 then AUDV0 = 8 : AUDC0 = 6 : AUDF0 = 1 : h = h - 1 : if h = 0 then AUDV0 = 0 Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 8, 2013 Share Posted June 8, 2013 This compiles for me using the version of batari Basic in the bBWin7_64bit.zip file: Thanks for mentioning that! I keep running into compile issues where the only way I can make a program compile is to either split some logic into nested ifs (such as "if a = 1 then if b = 2 then ..." instead of "if a = 1 && b = 2 then ..."), or split a nested if into separate lines, or some other type of revision in the logic. For the record, the version of 2600basic.exe that I've been using is dated 07/28/2011 at 12:32AM. I'll try the files you've linked to. I probably never applied them because the OS on my desktop computer is 32-bit, not 64-bit. Quote Link to comment Share on other sites More sharing options...
Rabbit 2600 Posted June 8, 2013 Author Share Posted June 8, 2013 Aha! So the error was that I should have split if h > 0 then AUDV0 = 8 : AUDC0 = 6 : AUDF0 = 1 : h = h - 1 : if h = 0 then AUDV0 = 0 up? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted June 8, 2013 Share Posted June 8, 2013 Aha! So the error was that I should have split if h > 0 then AUDV0 = 8 : AUDC0 = 6 : AUDF0 = 1 : h = h - 1 : if h = 0 then AUDV0 = 0 up? No. You had h + 10 instead of h = 10. Do not split the line. if you use more than one noise on the same channel, splitting the line will cause the channel to be muted. Quote Link to comment Share on other sites More sharing options...
Rabbit 2600 Posted June 8, 2013 Author Share Posted June 8, 2013 Ahh okay. Thank you for clearing that up =) 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.