+atari2600land Posted November 21, 2006 Share Posted November 21, 2006 Another distraction from my I game Plus, I started that when I was working on GoSub 2. Well, anyway, I'm working on way better versions of my first two games (Ants and Zyx, called Ants 2 and Zyx 2, respectively) and I'm trying to compile this and I got a message saying (379) Error: invalid operator: = So, I went to line 379, which is this: 3174 if joy0down then y=1 My question is why doesn't it like that? 6months.bas Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/ Share on other sites More sharing options...
Dragnerok X Posted November 21, 2006 Share Posted November 21, 2006 Another distraction from my I game Plus, I started that when I was working on GoSub 2. Well, anyway, I'm working on way better versions of my first two games (Ants and Zyx, called Ants 2 and Zyx 2, respectively) and I'm trying to compile this and I got a message saying (379) Error: invalid operator: = So, I went to line 379, which is this: 3174 if joy0down then y=1 My question is why doesn't it like that? It could be one of many things. 1. I usually type out something like "y=1" like this: y = 1, not like this: y=1, though I highly doubt that would affect anything. 2. Usually, in most cases when using Bb, you can't just "give" something a value unless it's on it's own line, i.e. like this... --------------------------------------------------- 203 y = 1 a work around in your case would either be: 1. 3174 if joydown then goto 3176 3175 goto 1 3176 y = 1 3177 goto 1 or... 2. 3174 if joy0down then y = y + 1 3175 if y = 2 then y = y - 1 --------------------------------------------------- 3. Look through your code. If you find any lines like... 2235 z=y=x ...where the second equals should be a plus, or have any mistake of that sort, fix it. That should fix it! Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1178947 Share on other sites More sharing options...
SeaGtGruff Posted November 21, 2006 Share Posted November 21, 2006 I'm trying to compile this and I got a message saying (379) Error: invalid operator: = So, I went to line 379, which is this: 3174 if joy0down then y=1 My question is why doesn't it like that? You're looking at the wrong line; that line is okay. It's actually the line numbered 3176 that has the error in it: 3176 if collision(player0,playfield) then player0x=player0x-x : player0y=player0y=y The problem is at the very end of the line, where it says "player0y=player0y=y". I'm not sure if you intended to type a "-" (as in "player0x=player0x-x") but hit the wrong key by mistake, or if you intended to type a "+" but didn't hold down the shift key long enough. Anyway, fix that statement and try compiling again. Michael Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179030 Share on other sites More sharing options...
+atari2600land Posted November 21, 2006 Author Share Posted November 21, 2006 The problem is at the very end of the line, where it says "player0y=player0y=y". I'm not sure if you intended to type a "-" (as in "player0x=player0x-x") but hit the wrong key by mistake, or if you intended to type a "+" but didn't hold down the shift key long enough. Anyway, fix that statement and try compiling again. Michael Thank you! It's been so long since I've bankswitched, though. I compiled it and it compiles all right, but the result is all screwed up. Do I have to have a bank 0? Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179042 Share on other sites More sharing options...
SeaGtGruff Posted November 21, 2006 Share Posted November 21, 2006 Take out line 4, the one that says "bank 1". You don't declare the first bank when you bankswitch in bB, only the second, third, etc., banks. Michael Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179090 Share on other sites More sharing options...
+atari2600land Posted November 21, 2006 Author Share Posted November 21, 2006 (edited) Inch by inch... Now, the game compiles, but if you select Zyx 2 from the title screen (by making the cursor go over Zyx 2 and pressing switchreset, first off, notice how the title screen for Zyx 2 is blank (when the code I put in should make it say Zyx 2). and when you press right (which starts the game), instead of starting the game up, it crashes. Question: Why isn't the title screen for Zyx 2 say what I'm telling it to say? When it's a seperate binary file, the game works perfect, but when I put it in the 6 month anniversary file, it doesn't. zyx2.bas 6monthsa.bas Edited November 21, 2006 by atari2600land Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179125 Share on other sites More sharing options...
SeaGtGruff Posted November 21, 2006 Share Posted November 21, 2006 Inch by inch... Now, the game compiles, but if you select Zyx 2 from the title screen (by making the cursor go over Zyx 2 and pressing switchreset, first off, notice how the title screen for Zyx 2 is blank (when the code I put in should make it say Zyx 2). and when you press right (which starts the game), instead of starting the game up, it crashes. Question: Why isn't the title screen for Zyx 2 say what I'm telling it to say? When it's a seperate binary file, the game works perfect, but when I put it in the 6 month anniversary file, it doesn't. The problem is that when you use bankswitching in bB, you have to put all of the playfield commands in the last bank, because that is where bB's "system routines" will be-- in particular, the drawscreen routine or display kernel-- and the ROM-resident playfield data has to be located in the same bank as bB's drawscreen routine, otherwise the kernel won't be able to find the playfield data (i.e., when it looks in the memory locations where the playfield ROM data is supposed to be, the playfield won't be there-- because it's located at that address all right, but in the *other* bank, which isn't switched in at that moment). I've modified your code slightly to work around this restriction. Basically, everything is just like you had it, except for the two places in bank 1 where you were using the playfield command (lines 2040 and 2101). I moved those two playfield commands to the end of bank 2, and stuck a return at the end of each, then I went back to the spots where those two playfield commands used to be, and I replaced them with "gosub 2040 bank2" and "gosub 2101 bank2" respectively. This causes bB to store the ROM data for those two playfield statements in bank 2-- the same bank where the kernel is located-- so the kernel will be able to load that playfield data when it's drawing the screen. Michael 6monthsa.bas Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179147 Share on other sites More sharing options...
+batari Posted November 21, 2006 Share Posted November 21, 2006 The problem is that when you use bankswitching in bB, you have to put all of the playfield commands in the last bank, because that is where bB's "system routines" will be-- in particular, the drawscreen routine or display kernel-- and the ROM-resident playfield data has to be located in the same bank as bB's drawscreen routine, otherwise the kernel won't be able to find the playfield data (i.e., when it looks in the memory locations where the playfield ROM data is supposed to be, the playfield won't be there-- because it's located at that address all right, but in the *other* bank, which isn't switched in at that moment). I looked into this problem last night and I think it can be fixed. I added it to the todo list, which is kinda long. Stay tuned Quote Link to comment https://forums.atariage.com/topic/97216-6-month-anniversary-game/#findComment-1179549 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.