Autonomous pros I need help
With what specifically?
it is show the red under line and it will not download to the slot and we are rookies to vex pros
We are bad at this there is a lot more to just that it is all through our code
Please copy and paste your entire program into a reply, remembering to wrap it in triple backtics (```) for formatting.
Some additional description of the problem would also be helpful. Does the program compile? If not, what errors are you getting when you try to compile it? If it does compile, what does it do, and how is that different from what you want it to do?
Also, you should recategorize this post to #edr-technical-support:pros-support - not everyone reads the “website/forum support” category.
I am sorry I am a newbie to autonomous so don’t know what you mean
I need help with autonomous mode on vex pros why does the red show up and also it will not download correct
But it will not run the way we coded it to do and it will download on to the slot we want it on
```
Past your code here
```
```
Past the errors from the terminal that pops up when you upload your code here
```
(I’ve renamed the thread to be more useful, moved it to a more appropriate category and combined a duplicate thread)
I’m on a phone so I cant
log in to the forums on the laptop
I will when I have the chance to I don’t have one with me right now
I suggest you log into the forum on the laptop you are using to write the code. It’s very difficult to debug code without being able to (a) see the entire program and (b) edit it to correct any errors. Photos of a screen do not enable either of these features.
#include "main.h"
pros::Controller c(pros::E_CONTROLLER_MASTER);
pros::Motor DriveL(6);
pros::Motor DriveR(7);
pros::Motor IntakeL(1);
pros::Motor IntakeR(3);
pros::Motor Placer(5);
void setDrive(int l, int r)
{
DriveL.move(l);
DriveR.move(-r);
}
void set Intake(int p)
{
IntakeL.move(p);
IntakeR.move(-p);
}
void setPlacer(int p)
{
Placer.move(p);
}
void initialize() {
}
void disabled() {}
void competition_initialize() {}
void autonomous() {
set Intake(1000)
pros::delay(1000);
set Drive(127,127);
pros::delay(1000);
set Drive(127,127);
set Drive(0,0);
}
void opcontrol() {
int x,y;
while (true) {
x = abs(c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y)) > 5 ? c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y) : 0;
y = abs(c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_X)) > 5 ? c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_X) : 0;
setDrive(y+x,x-y);
if(c.get_digital(pros::E_CONTROLLER_DIGITAL_L2))
setIntake(127);
else if(c.get_digital(pros::E_CONTROLLER_DIGITAL_L1))
setIntake(-127);
else
setIntake(0);
if(c.get_digital(pros::E_CONTROLLER_DIGITAL_UP))
setPlacer(127);
else if(c.get_digital(pros::E_CONTROLLER_DIGITAL_DOWN))
setPlacer(-127);
else
setPlacer(0);
pros::delay(20);
}
}
if you could help that would be awsome
Function names (such as setIntake
, setDrive
, etc.) can not contain spaces.
Modify instances of set Drive
, set Intake
, etc. to remove the space.
ok thank you so much any thing else
when i took away the space the red line popped back up
I suggest you try to compile the program and see what happens. Red underlines don’t indicate program error, it may just be a spell checker complaining about something.
If your program fails to compile, please post the complete error you receive and we can help you further.