Program will not download [Vex C++]

Today we were planning on testing our robot. What we found was our program wouldn’t get onto the brain. When we clicked the download button we got a message that said compiling and that was it. When we checked the brain there was nothing new in any folders. When running the default loaded claw bot program just to test motors it worked fine. The battery was at about 50% charge. Is there an extra step we’re forgetting ?

edit: we are using vex C++ in VCS

i had this problem, i think it has something to do with comments. Can u post the code text itself one here, (not the VCS file)

So i tried putting it in and out of the competition template.

Comp template:

#include "robot-config.h"
/*---------------------------------------------------------------------------*/
/*                                                                           */
/*        Description: Competition template for VCS VEX V5                   */
/*                                                                           */
/*---------------------------------------------------------------------------*/

//Creates a competition object that allows access to Competition methods.
vex::competition    Competition;

/*---------------------------------------------------------------------------*/
/*                          Pre-Autonomous Functions                         */
/*                                                                           */
/*  You may want to perform some actions before the competition starts.      */
/*  Do them in the following function.  You must return from this function   */
/*  or the autonomous and usercontrol tasks will not be started.  This       */
/*  function is only called once after the cortex has been powered on and    */
/*  not every time that the robot is disabled.                               */
/*---------------------------------------------------------------------------*/

void pre_auton( void ) {
  // All activities that occur before the competition starts
  // Example: clearing encoders, setting servo positions, ...
  
}

/*---------------------------------------------------------------------------*/
/*                                                                           */
/*                              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 ) {
  // Set motor velocities
 // 90 % to conserve battery on things that don’t need much power.
  Front.setVelocity(90,velocityUnits::pct);
  VerticalL.setVelocity(90,velocityUnits::pct);
  VerticalR.setVelocity(90,velocityUnits::pct);
  while (1){
      DriveL.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct);
      DriveR.spin(vex::directionType::fwd, Controller1.Axis2.value(), vex::velocityUnits::pct);
      if(Controller.ButtonR2.pressing()) //if back right trigger is pressed then...
      {
          Front.spin(directionType::fwd);
          VerticalL.spin(directionType::fwd);
          VerticalR.spin(directionType::rev);
      }
      if(Controller.ButtonR1.pressing()) //if front right trigger is pressed then...
      {
          Front.spin(directionType::rev);
          VerticalL.spin(directionType::fwd);
          VerticalR.spin(directionType::rev);
      }
    vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources. 
  }
}

//
// Main will set up the competition functions and callbacks.
//
int main() {
    
    //Run the pre-autonomous function. 
    pre_auton();
    
    //Set up callbacks for autonomous and driver control periods.
    Competition.autonomous( autonomous );
    Competition.drivercontrol( usercontrol );

    //Prevent main from exiting with an infinite loop.                        
    while(1) {
      vex::task::sleep(100);//Sleep the task for a short amount of time to prevent wasted resources.
    }    
       
}

This is the non competitoon one:

#include "robot-config.h"
          

int main() {
 // Set motor velocities
 // 90 % to conserve battery on things that don’t need much power.
  Front.setVelocity(90,velocityUnits::pct);
  VerticalL.setVelocity(90,velocityUnits::pct);
  VerticalR.setVelocity(90,velocityUnits::pct);
  while (1){
      DriveL.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct);
      DriveR.spin(vex::directionType::fwd, Controller1.Axis2.value(), vex::velocityUnits::pct);
      if(Controller.ButtonR2.pressing()) //if back right trigger is pressed then...
      {
          Front.spin(directionType::fwd);
          VerticalL.spin(directionType::fwd);
          VerticalR.spin(directionType::rev);
      }
      if(Controller.ButtonR1.pressing()) //if front right trigger is pressed then...
      {
          Front.spin(directionType::rev);
          VerticalL.spin(directionType::fwd);
          VerticalR.spin(directionType::rev);
      }
    vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources. 
  }
}


}


I don’t have the bot with me now, but I do tommorow after school.

hmmm. thats weird. It looks fine. Sorry for the trouble, but can you post the VSC file this time? I’ll try it on my pc.

and also idk why that posted twice

Our school computers delete any files on them. So i had to store it in google drive. I don’t have the file.

oh, thats alright

I can make one now. All i’d have to do is drag in the motors

yeah, i was just about to ask if i should do it, you want to or should I?

I can do it in 30 seconds. I’ve had to do it every meeting.

oh ok :slight_smile:

Well My computer can’t save it either now.
Can you do it on your end.

It’s just drive L port 12
drive R port 2 (reversed)
vertical L port 13 (reversed)
vertical R port 3
Front port 16
with the radio transmitter in port 6

Thanks so much for the help.

no problem

Do example programs download ?

I tried the code, it didnt work for me either

I can test that tommorow , but the clawbot program in the vex folder worked.

Sure, but that’s an internal program and an integral part of vexos. Just want to find out if it’s an issue with physical connection/cable/driver etc. or an issue with this code. I will have a quick look and see if it works here.

@jpearman
Well since 7517j also got the same issue I assume it’s a problem with my code, but in that case what did I do.

edit: I will still test example programs when I can work on my robot tomorrow.