Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
attr.bas syntax error
#1
Hi! I'm writing a game about a pig that has to eat various food items. Food items are realized by means of UDG's stored in DATA lines and READ in en masse at the beginning of the game. Then, to draw the necessary items, I move address 23675/-76 to the required location. Until yesterday, the system worked flawlessly. Now I added a new item, and the compiler began to throw the following errors. The highest address an UDG byte is stored is 65294, i.e. AFAIK it is still allowed. I did nothing else than add the new DATA files and jump conditions to draw the new item, and what previously worked impeccably, just stopped doing so. I simply don't know what to do. Could you help? Thanks in advance!


.jpg   Clipboard01.jpg (Size: 232.31 KB / Downloads: 333)
Reply
#2
Most likely, the error is due to an illegal character or an extra or missing character.

Check the lines you've added lately.



It's a bad idea to have the sprites in DATA lines.
Sometimes it is necessary to save bytes.

Classic method:

- In an emulator, place the DATA lines, generate the UDG, and SAVE "sprites" USR "A", 96*8

Direct method:

- Place the sprites in an image editor and generate the TAP with the sprites at the URL
https://arcalusitana.org/MuseuZX/ZXspritesUDG

Then, you can LOAD the sprites directly to the USR "A" address.

Example: Memory
Reply
#3
zarsoft Wrote:Most likely, the error is due to an illegal character or an extra or missing character.

Check the lines you've added lately.



It's a bad idea to have the sprites in DATA lines.
Sometimes it is necessary to save bytes.

Classic method:

- In an emulator, place the DATA lines, generate the UDG, and SAVE "sprites" USR "A", 96*8

Direct method:

- Place the sprites in an image editor and generate the TAP with the sprites at the URL
https://arcalusitana.org/MuseuZX/ZXspritesUDG

Then, you can LOAD the sprites directly to the USR "A" address.

Example: Memory

Holy moly, thank you!!! Exactly that was the problem, I "misspelled" two DATA items! What puzzled me was that the error messages were referring to the ATTR module rather than my program (as they always did up to this moment whenever I wrote something wrong). Thanks for the sprite saving tips, too! I am a kind of newbie, I used to use BASIC extensively as a kid back in the 80's, but never wrote anything involving sprites due to BASIC being too slow. Now at almost 50, nostalgia found me and tried it with the modern tools like Boriel ZX Basic Smile
Reply
#4
csk Wrote:
zarsoft Wrote:Most likely, the error is due to an illegal character or an extra or missing character.

Check the lines you've added lately.



It's a bad idea to have the sprites in DATA lines.
Sometimes it is necessary to save bytes.

Classic method:

- In an emulator, place the DATA lines, generate the UDG, and SAVE "sprites" USR "A", 96*8

Direct method:

- Place the sprites in an image editor and generate the TAP with the sprites at the URL
https://arcalusitana.org/MuseuZX/ZXspritesUDG

Then, you can LOAD the sprites directly to the USR "A" address.

Example: Memory

Holy moly, thank you!!! Exactly that was the problem, I "misspelled" two DATA items! What puzzled me was that the error messages were referring to the ATTR module rather than my program (as they always did up to this moment whenever I wrote something wrong). Thanks for the sprite saving tips, too! I am a kind of newbie, I used to use BASIC extensively as a kid back in the 80's, but never wrote anything involving sprites due to BASIC being too slow. Now at almost 50, nostalgia found me and tried it with the modern tools like Boriel ZX Basic Smile

I'm improving Boriel ZX Basic error reporting.
Syntax errors like these are a bit difficult to improve. Will keep you posted.

If you can post a minimal bas listing, it will save me precious time.
---
Boriel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)