Please Help Me

Hi! Somewhat new to programming, and I am struggling to compile my program onto my robot.
Here is an example of the error appearing next to “void autonomous( void ) {”
cannot combine with previous ‘type-name’ specifier

Please help me. I don’t know what to do to fix it.

Don’t use Vcs use be be code vex has discontinued VCS

Could you post the entire autonomous function?

(make sure to put ‘’’ around the code)

1 Like

Here is the autonomous and user control code copied directly from the program. We do not have autonomous yet:

"/---------------------------------------------------------------------------/
/* /
/
Autonomous Task /
/
/
/
This task is used to control your robot during the autonomous phase of /
/
a VEX Competition. /
/
/
/
You must modify the code to add your own robot specific commands here. /
/
---------------------------------------------------------------------------*/

void autonomous( void ) {
// …
// Insert autonomous user code here.
// …

}

/----------------------------------------------------------------------------/
/* /
/
User Control Task /
/
/
/
This task is used to control your robot during the user control phase of /
/
a VEX Competition. /
/
/
/
You must modify the code to add your own robot specific commands here. /
/
----------------------------------------------------------------------------*/

void usercontrol( void ) {
while (1){
LeftWheels.spin(directionType::fwd,Controller1.Axis2.value(), vex::velocityUnits::pct) ;
RightWheels.spin(directionType::fwd,Controller1.Axis2.value(), vex::velocityUnits::pct) ;
if(Controller1.ButtonR1.pressing()){
ClawLift.spin(directionType::fwd,50,vex::velocityUnits::pct);
}
else if(Controller1.ButtonR2.pressing()){
ClawLift.spin(directionType::rev,50,vex::velocityUnits::pct);
}
else{
ClawLift.stop(brakeType::hold);
}
if(Controller1.ButtonL1.pressing()){
Claw.spin(directionType::fwd,50,vex::velocityUnits::pct);
}
else if(Controller1.ButtonL2.pressing()){
Claw.spin(directionType::rev,50,vex::velocityUnits::pct);
}
else{
Claw.stop(brakeType::hold);
}"

vex::competition (Competition) ;

now it also says this is incorrect. It says it redefines this, but when I removed it, it said it did not declare anything.

Probably won’t fix your issue, but you need two more closing braces at the end of your driver control function