This may be the problem, you are using namespace vex but then are using vex:: in the code. Try getting rid of the using namespace vex line. Also, your arm code is not in the main task and the while true statement for the arm code needs to be closed. In other words, try getting rid of the using vex namespace line and closing the code.
As explained Button.Value() is not a valid sensing Boolean for buttons. They are valid only for Joystick Axes. Assuming you have your motors configured correctly …the code below should work
#include “robot-config.h”
int main()
{
while(true)
{
Backleftmotor.spin(vex::directionType::fwd, Controller1.Axis3.value()/2, vex::velocityUnits::pct); //Tank Control : Motor runs at half speed
Backrightmotor.spin(vex::directionType::fwd, Controller1.Axis2.value()/2, vex::velocityUnits::pct); //Tank Control : Motor runs at half speed
if(Controller1.ButtonX.pressing()) // ARM1 motor runs for half speed when you Button X pressing
{
Arm1.spin(vex::directionType::fwd, 50, vex::velocityUnits::pct); // Motor run at half speed
}
else
{
Arm1.stop(vex::brakeType::hold);
}
if(Controller1.ButtonB.pressing()) // ARM1 motor runs for half speed when you Button B pressing
{
Arm2.spin(vex::directionType::fwd, 50, vex::velocityUnits::pct); // Motor run at half speed
}
else
{
Arm2.stop(vex::brakeType::hold); //holds the arm where it is stopped