I am working on a pretty beefy code for a robot I am entering in a competition. To give you a rough idea, the robot picks up blocks by color and stacks them in a specific order. the code is not finished, but I compiled my work thus far and I get the error in the subject. I looked all ove for IF-statement syntax errors (which seem to be the case in related posts about this error) but I cannot spot any. I removed the last loop in the code, and the loop right above it got the error instead…not sure what this is, so any halp is appreciated.
Big_Boy_Code.ino (10.6 KB)
The compiler tells you what line number the error is in.
Please do this:
1/ When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
2/ In a forum reply here, click on the reply field.
3/ Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
4/ Press “Ctrl + V”. This will paste the error between the code tags.
5/ Move the cursor outside of the code tags before you add any additional text to your reply.
I looked all ove for IF-statement syntax errors (which seem to be the case in related posts about this error) but I cannot spot any
The problem may well be a missing semicolon somewhere before the if statement as suggested by the error message
Please post the full error message copied from the IDE
if (side = 0)
How carefully did you check your use of the if statement ?