This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Specter Twilight's profile picture

I need additional eyes for this error...

Started by Specter Twilight, 29 March 2014 - 08:05 PM
Specter Twilight #1
Posted 29 March 2014 - 09:05 PM
I've spent the better half of the day typing up a program for an Advanced Mining Turtle to clear out a 32x5x32 space for a Buildcraft Quarry, as to avoid the blocks in that initial area from being destroyed by the Quarry's setup, and automatically empty its inventory into a chest when its 16th slot has any items in it. When attempting to run the program (under the name Quarry32), the following message is returned:

"bios:339: [string "Quarry32"]:127:
' then' expected"

As for the code:
http://pastebin.com/9EaJ1c66

I am unable to find the error that is being returned to me upon trying to run the code. I would be grateful if someone else with more experience were to be able to spot it out.

Please note that this is my first ComputerCraft program ever, and thus is bound to be sloppy, dirty, and redundant (as well as including a y value that's dynamically kept track of, but is never actually used), however I don't require simplification, only fixes for errors.

Thank you in advance.
Lyqyd #2
Posted 29 March 2014 - 09:19 PM
This error is covered under the Common Errors section of my favorite sticky post.

You've got an assignment operator in your if statement instead of a comparison operator.
Specter Twilight #3
Posted 30 March 2014 - 12:47 AM
This error is covered under the Common Errors section of my favorite sticky post.

You've got an assignment operator in your if statement instead of a comparison operator.

*Sigh*

My bad. I read through your sticky before posting, but I suppose I wasn't quite wrapping my head around what you said. Though I do understand the terms conditional and assignment, of course. I apologize for wasting your time.
Lyqyd #4
Posted 30 March 2014 - 02:18 AM
Hey, no worries! At least you read it. :)/>