Code stops working

Hello! First post on vex forums and I need help. My team and I have just qualified to go to worlds in about a month and a half, and our code completely stopped. We tried re-downloading the code and trying it on a test brain, but to no avail. We suspect it is due to our code, but after looking through it, none of our coders could find anything. There are no errors in the code, either. Any help or advice is appreciated, thanks. Here’s the code :

void usercontrol(void){
  // User control code here, inside the loop
  while (1) {
  Left_Motor.spin(directionType::rev, (Controller1.Axis2.value() + Controller1.Axis1.value())/2, velocityUnits::pct); //(Axis1+Axis2)/2;
   Right_Motor.spin(directionType::fwd, (Controller1.Axis2.value() - Controller1.Axis1.value())/2, velocityUnits::pct);
    
 
 if(Controller1.ButtonR1.pressing()==1){
    scuffedintake.spin(vex::directionType::rev, 100, vex::percentUnits::pct);
 }else{ 
    scuffedintake.stop();
 
 }
if(Controller1.ButtonUp.pressing()==1){
    Rollyboi.spin(vex::directionType::fwd, 100, vex::percentUnits::pct);
  }else{ 
  Rollyboi.stop();
  }
    if(Controller1.ButtonR2.pressing() == 1){
  
   Flywheelyboi.spin(vex::directionType::fwd, 300, vex::velocityUnits::rpm);
    }else{

Flywheelyboi.stop();
}


   led Pneumatics = led(Brain.ThreeWirePort.A);
  if (Controller1.ButtonA.pressing()==1){
Pneumatics.off();
  } else {Pneumatics.on(); }
  if(Controller1.ButtonB.pressing() == 1){
   eggyspand.spin(vex::directionType::fwd, 25,vex::percentUnits::pct);
  }

    // This is the main execution loop for the user control program.
    // Each time through the loop your program should update motor + servo
    // values based on feedback from the joysticks.

    // ........................................................................
    // Insert user code here. This is where you use the joystick values to
    // update your motors, etc.
    // ........................................................................

    wait(20, msec); // Sleep the task for a short amount of time to
                    // prevent wasted resources.
  


//
// Main will set up the competition functions and callbacks.
//
int main(void);
    // Set up callbacks for autonomous and driver control periods
  
  Competition.autonomous(autonomous);
  Competition.drivercontrol(usercontrol);

  // Run the pre-autonomous function.
  pre_auton();

  // Prevent main from exiting with an infinite loop.
  while (true) {
    wait(100, msec);
    }
   }}
1 Like

Your int main is messed up. In addition, there is no end to your driver control. Make your int main actually include everything it should and fix some of your brackets.

1 Like

I got it working again, thanks!