[FONT=“Times New Roman”][/FONT]
I’m trying to program an autonomous for our team on ROBOTC 4.0.
Please help, compitition in two weeks from whenever this was posted.
Is this the entire code? You have to use the competition template. It appears you are not using the competition template, therefore it is not “activating” autonomous at any point. You simply have a task created.
That is only the autonomous part of the code. Also, I tried putting it on the competition template and tested it on a dummy robot, I’m not sure if the code is faulty or if it’s the robot.
If you are running this by itself, it looks like you are making your code a task (autonomous), but RobotC is getting mad because you aren’t using the task anywhere. The program should still work and compile, as long as you have something set up to run the task.
We can’t really help more without your .c file. If your posted your actual file as an attachment we could tell you what is wrong very quickly.
Or just copy and paste the ENTIRE code on here. If all you have is what is shown above, it will not work. But we are stuck guessing what is wrong because we don’t know the rest of your code.
You aren’t using the competition template. Go to new > file > Competition template (I think). This will give you pre_auton(), autonomous(), and usercontrol() blocks. Copy over the code that is in your main() function into the usercontrol(), and copy the autonomous() over.