LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Idk some kinda ENDIF syntax error problem

Root / Programming Questions / [.]

ChaseCZCreated:
Yo I haven't opened smilebasic in a long time and i got a problem. Here on this pic whenever i run the code it just gives me a syntax error on line 110, if i change it to just END, it gives me a syntax error on line 118 and if do the same on the line 118 then it gives me a WEND without WHILE error even though both are there... Idk i didn't do anything in smilebasic for a long time and i feel like i forgot a lot of things

If you start a FOR loop inside an IF statement, you must end it with NEXT before it reaches ENDIF. I think you're also missing an ENDIF near WAIT 1.

If you start a FOR loop inside an IF statement, you must end it with NEXT before it reaches ENDIF. I think you're also missing an ENDIF near WAIT 1.
Oh yeah so i must put the NEXT which is at the bottom above ENDIF and yeah idk for sure but i think there already is ENDIF below WAIT 1

Keywords that start and end must not intersect, but only enclose code. Tabbing in when you go into one of these 'blocks' simplifies knowing whether or not you've already given the ending keyword. example:
WHILE 1
 IF what THEN
  FOR I=0 TO yeet
   ?"your mom",I
  NEXT
 ENDIF
WEND