Intake Programming Help

I came to the vex forum to ask this because the team cannot figure it out. Our intake motors won’t spin. We have tried everything mechanically which is why I set the category to VEXcode V5 Text Tech Support. It is a programming problem. Our Code says:

`int main() {
if (MasterController.ButtonR2.pressing()) {
IntakeMotor1.spin(directionType::fwd,100, percentUnits::pct);
IntakeMotor2.spin(directionType::rev,100, percentUnits::pct);
} else if (MasterController.ButtonR1.pressing()){
IntakeMotor1.spin(directionType::rev,100, percentUnits::pct);
IntakeMotor2.spin(directionType::fwd,100, percentUnits::pct);
} else {


Vex V5 Text did not find any errors with my code, but it still will not run. We checked for logic errors but cannot figure out where it is. Does anybody know what is wrong?

Not running in a loop. It will check once at program start then finish. This is probably one of the most common things people run into when starting to code robots, so you’re in good company.


That was our problem. Thank you so much!