In the official RobotC Technical Support Channel, @RoughRiderRobotics posted code with an error. It was:
The important bits are the actual Error messages. They are:
Which tells you what you did wrong. You left a “}” off at the end of the file.
To see this better, you should occasionally press the magic wand “Fix Formatting” button on the RobotC toolbar. This will indent the code, making it easier to see these kinds of mistakes.
If you want help quickly, post in an unofficial channel in the forum. It can take a day or so for the official channels to get attention.
Another helpful tip for a “noob” (your word, not mine) is that when posting code on the forum, enclose it in “code” tags. You can do this by pressing the “code” button in the “Start a conversation” toolbar. It’s the symbol that looks like </> .
Here’s your code, with indentation and that error fixed. I did nothing else.
So, if you look at the indented copy of your code, it looks like you had an extra open curly brace just before //Arm Control. So, instead of adding an extra closing curly brace at the end, you cold instead take out the extra open curly brace. Then your code would look like this:
Thanks, I will be sure to post in an unofficial channel next time.
I fixed the error, but I have another question. How would I start a code for the left and right drive motors?
I understand it’s a little different from the code I have for the arm and claw motors.
I plan on using and tank control driving style.