Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 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

  • 1

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
  • 1

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 an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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