Program error confusion

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Program error confusion

Post by Crayon21 »

after getting a right kick in the ass needed for the CGC, I have decided to do something a little different

However, my program keeps getting either an error 5, 2 or B. I have no idea what is going on. I increased the ram to 32k, still had an issue. Tried CONT, still had an issue.

The program WAS supposed to draw a box on the bottom left (I managed that amazingly), then other shapes as required. Unfortunately, i scrapped it by accident. The new program dots lines diagonally and is supposed to end with a moving graphic after all options have been exhausted.

Can someone take a look and tell me what i'm doing wrong?

(god willing it loads ok)
Attachments
The Swarm.p
(1.89 KiB) Downloaded 112 times
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
Neurogate
Posts: 24
Joined: Tue Aug 31, 2021 6:46 pm

Re: Program error confusion

Post by Neurogate »

Line 140 - loop from 0 to 120 and it is X coordinates, which you use in PLOT at the line 141, but X can be from 0 to 63, no more. Same mistake at the line 146 & 151 - you tried to PLOT at the coordinates 100,100 and by this you got B mistake at the line 151.

And please check all your loops. For example at the line 60 you start a loop with variable X and again at the line 100 you start another loop with same variable X, but where is end of previous loop? Where is their "NEXT X"?
Sinclair ZX81, Sinclair QL, Sinclair ZX Spectrum +2, Atari 130XE, Commodore 64C, Commodore C128, Yamaha YIS503IIIR MSX2 & etc
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: Program error confusion

Post by Crayon21 »

thanks
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
Post Reply