Need help with controller

Hey guys, we were hoping that you had experienced this issue and would be able to help us. While we have a code written in the right way, and it compiles perfectly fine, when we push it to the robot, the controller does not do the things it was instructed into the code. Can you help?

Also, when I click on the controller axies, nothing happens.

17 PM

Um you need to set up your motors/drivetrain first to pick the buttons.

we did that, so i’m not sure why it’s not working

20char

Can you share your code please? We need more information to offer a solution.

Upload the code so we can check it out maybe your statements are contradicting itself

ok, here goes.
/----------------------------------------------------------------------------/
/* /
/
Module: main.cpp /
/
Author: kids /
/
Created: Thu Jan 02 2020 /
/
Description: V5 project /
/
/
/
----------------------------------------------------------------------------*/

// ---- START VEXCODE CONFIGURED DEVICES ----
// Robot Configuration:
// [Name] [Type] [Port(s)]
// Controller1 controller
// Left motor 1
// Right motor 2
// Spinner1 motor 3
// Arm motor 10
// ArmAngle motor 5
// Spinner2 motor 6
// BackLeft motor 7
// BackRight motor 8
// ---- END VEXCODE CONFIGURED DEVICES ----

#include “vex.h”

using namespace vex;

int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();

}

void usercontrol( void ) {
while (1){
Left.spin(vex::directionType::rev, Controller1.Axis2.value(), vex::velocityUnits::pct);
Right.spin(vex::directionType::fwd, Controller1.Axis3.value(),vex::velocityUnits::pct);
BackLeft.spin(vex::directionType::rev, Controller1.Axis2.value(),vex::velocityUnits::pct);
BackRight.spin(directionType::fwd, Controller1.Axis3.value(),vex::velocityUnits::pct);
if(Controller1.ButtonLeft.pressing())
{
Spinner1.spin(vex::directionType::fwd);
Spinner2.spin(vex::directionType::fwd);
}
if(Controller1.ButtonRight.pressing())
{
Spinner1.spin(vex::directionType::rev);
Spinner2.spin(vex::directionType::rev);
}

}

if(Controller1.ButtonX.pressing())
{
Arm.spin(vex::directionType::fwd);
}
else if(Controller1.ButtonB.pressing())
{
Arm.spin(vex::directionType::rev);

}
if(Controller1.ButtonUp.pressing())
{
ArmAngle.spin(vex::directionType::fwd);
}

else if (Controller1.ButtonDown.pressing())
{
ArmAngle.spin(vex::directionType::rev);
}
vex::task::sleep(20);
}