Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected token 'NEXT'

this is my 1st post! Total newbie.

I just typed in the 1st program in the book "ZX Spectrum Games Code Club: Twenty fun games to code and learn" by Gary Plowman (from Amazon),
but when I attempt a "zxb ex1.bas" , it throws up a couple of errors.
I've checked the code and it appears valid. Any ideas on what the problem could be?

(I've attached the .bas file)


Attached Files
.bas   ex1.bas (Size: 3 KB / Downloads: 139)
Yes, the problem (despite this weird error) is not with the FOR, but with the IF.
Unlike Sinclair BASIC, ZX BASIC requires each IF to be closed with an END IF.
So after every IF line, in the end, add :END IF and compile it.

Try it, and tell me.

Forum Jump:

Users browsing this thread: 1 Guest(s)