Could someone explain whats wrong with my code at 127? I've been changing this same portion for the last 15 minutes and all I've gotten was a line of errors :/
Just for reference:
There are 2 kinds of if statements: single-line and multi-line. Single-line if statements look like this:
IF I>3 THEN:PRINT "Hello, world!": ELSE:PRINT "No"
Multi-line if statements look like this:
IF I>3 THEN
PRINT "Hello, world!"
ELSE
PRINT "No"
ENDIF
(note the ENDIF)
You can also use ENDIF in single-line if statements while nesting them.
(continued)
(continued)
IF I>3 THEN:PRINT "Hello, world!":IF I>4 THEN:PRINT "Sample text":ENDIF:PRINT "Hi"
(you don't need to put an ENDIF on your if statement unless you want to put something after the if)
This is completely okay:
IF I>3 THEN
PRINT "A"
IF I>4 THEN:PRINT "B"
ENDIF
This is not okay (afaik, but it looks awful and you shouldn't use it):
IF I>3 THEN:PRINT "A":IF I>4 THEN
PRINT "B"
ENDIF