Syntax error line 120

Copied the code from “Retrostart Learn Commodore 64 Basic Programming”

using Chipmunk Basic on my Mac.

Sorry if this is a noob annoying question.

Syntax Error in line 120

10 rem - THIS NUMBER GUESSING GAME IS BASED ON GUESS AND HI - LO

20 rem - FROM DAVID H. AHL'S BOOK BASIC COMPUTER GAMES.

30 print "======="

40 print " ZERO!"

50 print "=======" : print

60 print "I CHOOSE A NUMBER BETWEEN 1 AND 100." : print

70 print "YOU MUST ZERO IN ON IT IN 7 GUESSES." : print

80 print "I TELL YOU TO GUESS HIGHER, OR LOWER." : print

90 input "PRESS ENTER TO START. READY";start$

100 num = int(100*rnd(1))

110 print : print "============" : print

120 print "I HAVE CHOSEN A NUMBER" : print : num

130 for count = 1 to 7

140 print "GUESS ";count;

150 input ": ";guess$

160 guess = val(guess$)

170 if guess = num goto 250

180 if guess num > then print "GUESS LOWER"

190 if guess < num then print "GUESS HIGHER"

200 print

210 next count

220 print : print "YOU'VE USED ALL OF YOUR GUESSES YOU BITCH NOW DIE"

230 print "THE NUMBER WAS";num

240 goto 270

250 print "YOU GOT IT IN ";count;

260 print " GUESSES."

270 print

280 input "PLAY AGAIN? (Y/N) ";a$

290 if a$ = "Y" then go to 100

300 end

line 120 should read.

120 PRINT “I HAVE CHOSEN A NUMBER”:PRINT NUM (REMOVE NUM AT THE END TO NOT SHOW ANSWER)

LINE 180 should be changed as well.

From: IF GUESS NUM > THEN PRINT “GUESS LOWER”

To: IF GUESS < NUM THEN PRINT “GUESS LOWER”

LINE 290 SHOULD HAVE NO SPACE BETWEEN GO AND TO

290 IF A$ = “Y” THEN GOTO 100. (My roommate who knows nothing about this like me actually spotted this.

2 Likes

is this some sort of AD?

What do you mean by AD, as in an advertisement? no I’m not trying to sell anything. What would the ad be for anyway?

I didn’t even realize I had put a link for the website, but I guess it would serve as source material, but no this is not an advertisement.

ok then

I just thought it was weird to have a new user put a link and all that, didn’t see your post on smerrils old post also

sorry, sir/mam/attack helicopter

good luck on your journey and welcome to the forums

All good, thanks for the support.

All the best