Hey guys! I just downloaded my program to the brain of my bot and this error popped up the moment I ran the program. The code is down below:
`/*----------------------------------------------------------------------------*/
/* */
/* Module: main.cpp */
/* Author: VEX */
/* Created: Thu Sep 26 2019 */
/* Description: Competition Template */
/* */
/*----------------------------------------------------------------------------*/
// ---- START VEXCODE CONFIGURED DEVICES ----
// ---- END VEXCODE CONFIGURED DEVICES ----
#include "vex.h"
using namespace vex;
// A global instance of competition
competition Competition;
motor leftmotor = motor(PORT1,gearSetting::ratio18_1,false);
motor rightmotor = motor(PORT20,gearSetting::ratio18_1,true);
motor leftarm = motor(PORT9,gearSetting::ratio36_1,false);
motor rightarm = motor(PORT19,gearSetting::ratio36_1,true);
motor intake = motor(PORT13,gearSetting::ratio36_1,true);
controller H = controller(primary);
controller V = controller(partner);
encoder quad = encoder(Brain.ThreeWirePort.A);
// define your global instances of motors and other devices here
/*---------------------------------------------------------------------------*/
/* 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 V5 has been powered on and */
/* not every time that the robot is disabled. */
/*---------------------------------------------------------------------------*/
void pre_auton(void) {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
// 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) {
// User control code here, inside the loop
while (1) {
leftmotor.spin(directionType::fwd,H.Axis3.value(),velocityUnits::pct);
rightmotor.spin(directionType::fwd,H.Axis2.value(),velocityUnits::pct);
leftarm.spin(directionType::fwd,V.Axis3.value(),velocityUnits::pct);
rightarm.spin(directionType::fwd,V.Axis3.value(),velocityUnits::pct);
intake.spin(directionType::fwd,V.Axis2.value(),velocityUnits::pct);
if(H.ButtonL1.pressing()==1)
{
intake.spin(directionType::fwd,100,velocityUnits::pct);
}
else if(H.ButtonL2.pressing()==1)
{
intake.spin(directionType::fwd,-100,velocityUnits::pct);
}
else
{
intake.spin(directionType::fwd,0,velocityUnits::pct);
}
// prevent wasted resources.
}
}
//
// Main will set up the competition functions and callbacks.
//
int main() {
// 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);
}
}
`
I’m using VEXcode Pro V5 Text 2.05 right now. Thanks for the help in advance. This is kinda urgent since my team has a competition in like 2 weeks :\