Problem with coursework!! help!!

SKL BOI

Member
HI

i Have a proglem with my program that i wrote for my GCSE Coursework. i click the run button and it comes up with an error but i cannot see anything wrong with the line can some one tell me how to fix it so that it is correct.

it has a problem with the start of every line first line ie
Code:
 if keycount=2then letb5=1
but i do not think that that is wrong so can some one help please!
Code:
add9:
	if keycount = 2 then let b5 = 1
	goto action

add6:
	if keycount = 3 then let b6 = 1
	goto action
add5:
	if keycount = 1 then let b4 = 1
	goto action
add3:
	if keycount = 0 then let b3 = 1
	goto action
The error message is"compile error....
Error:Mistake on this line!"

Thanks to any help

SKL BOI
 
Last edited:

BeanieBots

Moderator
It would be very helpful if you actually stated what the error message is.

At a guess, you are getting "If without Endif" as the error message.
Each of your if statements must also have an endif at the end

eg.
add9:
if keycount = 2 then let b5 = 1
goto action
endif
 

bgrabowski

Senior Member
You cannot include a LET statement in the IF-THEN command when used in a single line. Look up the IF-THEN-ELSE command in the manual.
 
Last edited:
Top