Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Archived

This topic is now archived and is closed to further replies.

  • 0
Nilcky

Loop coding error

Question

I was trying to make a loop in the coding by doing while true do like i had seen on the forms but every time it came out with an error (error posted below) I'm new to coding and would appreciate any advice you can give on the subject 

Thank you ahead of time

   coding.PNG.8dfefd5ecafdb3fbf3fb343fe20651db.PNG913862896_coding23.PNG.c7960890e8da207ae901a2a4c2201608.PNG

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

Line 4 of your script requires an 'end' to close the 'if' statement. The error mentions that the 'while' clause needs an 'end', but that's just because the interpreter thinks the 'end' on line 6 belongs if the 'if'.

Share this post


Link to post
Share on other sites

Note this is why indenting is incredibly useful, if you correctly indented that code you would clearly see where you are missing an end

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.