port 1 and 10 help

My team has a problem we cant figure out port 1 and ten when we make a basic program such as startmotor they work but when we try to use them with our more complex program it does not work here is our program we would really like some help

#pragma config(Motor, port1, BackIntake, tmotorVex393_HBridge, openLoop, driveRight)
#pragma config(Motor, port2, Drive1, tmotorVex393_MC29, openLoop, driveLeft)
#pragma config(Motor, port3, Drive2, tmotorVex393_MC29, openLoop, driveLeft)
#pragma config(Motor, port4, Drive3, tmotorVex393_MC29, openLoop, reversed, driveRight)
#pragma config(Motor, port5, Drive4, tmotorVex393_MC29, openLoop, reversed, driveRight)
#pragma config(Motor, port6, launchleft, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port7, launchright, tmotorVex393_MC29, openLoop, reversed, driveLeft)
#pragma config(Motor, port8, gate, tmotorServoStandard, openLoop, driveRight)
#pragma config(Motor, port9, leftintake, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port10, rightintake, tmotorVex393_HBridge, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include “Vex_Competition_Includes.c” //Main competition background code…do not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
// Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////

void pre_auton()
{
// Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
// Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
bStopTasksBetweenModes = true;

// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, …
}

/////////////////////////////////////////////////////////////////////////////////////////
//
// Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{

}

/////////////////////////////////////////////////////////////////////////////////////////
//
// User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()

{
while (1==1)
{
motor[Drive1] = (vexRT[Ch2]);
motor[Drive2] = (vexRT[Ch2]);
motor[Drive3] = (vexRT[Ch3]);
motor[Drive4] = (vexRT[Ch3]);

if(vexRT[Btn5UXmtr2] == 1)
{
motor[port6] = 65.5;
motor[port7] = 65.5;

}
else
{
motor[port6] = 0;
motor[port7] = 0;

}
if(vexRT[Btn6UXmtr2] == 1)
{
motor[port10] = 100;
motor[port9] = 100;
motor[port1] =127;

}
else
{
motor[port1] = 0;
motor[port10] = 0;
motor[port9] = 0;
}
if(vexRT[Btn6DXmtr2] == 1)
{
motor[port10] = -127;
motor[port9] = -127;
motor[port1] = -127;

}
else
{
motor[port10] = 0;
motor[port9] = 0;
motor[port1] = 0;

}
if(vexRT[Btn6U] == 1)
{
setServo(port8, 0);
}
else
{
setServo(port8, 100);
}
}
}

It looks like these two if statements are cancelling each other out. While one is true and the other is false and the motors are set to 0.


if(vexRT[Btn6UXmtr2] == 1)
{
motor[port10] = 100;
motor[port9] = 100;
motor[port1] =127;

}
else
{
motor[port1] = 0;
motor[port10] = 0;
motor[port9] = 0;
}
if(vexRT[Btn6DXmtr2] == 1)
{
motor[port10] = -127;
motor[port9] = -127;
motor[port1] = -127;

}
else
{
motor[port10] = 0;
motor[port9] = 0;
motor[port1] = 0;

}

You could try something like this:


if(vexRT[Btn6UXmtr2] == 1)
{
motor[port10] = 100;
motor[port9] = 100;
motor[port1] =127;

}
else if(vexRT[Btn6DXmtr2] == 1)
{
motor[port10] = -127;
motor[port9] = -127;
motor[port1] = -127;

}
else
{
motor[port10] = 0;
motor[port9] = 0;
motor[port1] = 0;

}

Thanks so much I will try and see this evning