Hi there! I need some help.
When coding our bot, our team want to write a code so that the robot will move up and down depending on the value on axis 3 of our controller, and turn left or right depending on the value of the axis 1 of our controller, all having a delay between movements.
the code we have now is this:
if (Controller1.Axis3.position(percentUnits::pct)) != 0{ LeftMotor.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct); RightMotor.spin(vex::directionType::fwd, Controller1.Axis3.value(), vex::velocityUnits::pct); } if (Controller1.Axis1.position(percentUnits::pct)) != 0{ LeftMotor.spin(vex::directionType::fwd, Controller1.Axis1.value(), vex::velocityUnits::pct); RightMotor.spin(vex::directionType::fwd, Controller1.Axis1.value(), vex::velocityUnits::pct); }
However, when we compile, an "expected expression error shows up, with the first line of the code above.
What modifications do we need to make to our code so that it does as mentioned above?