Advanced Drive Sample Programming Errors

We are new to RobotC and were having issues with our programmers drive program having user errors. It seems to be a programming error so we loaded in RobotC’s sample drive program and inserted our correct motor ports and controls. We are still experiencing the same problems that we had with our own program. This is the sample program with how we modified it:
#pragma config(Motor, port1, leftfront, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, leftback, tmotorVex269_MC29, openLoop)
#pragma config(Motor, port9, rightback, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port10, rightfront, tmotorVex393_HBridge, openLoop, reversed)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

/----------------------------------------------------------------------------------------------------
|* - ADVANCED Single Joystick Control - |
|
ROBOTC on VEX 2.0 Cortex |
|
|
|
This program uses a single joystick, either right or left (this is configurable below) to drive |
|
the robot. |
|
|
|
ROBOT CONFIGURATION |
|
NOTES: |
|
1) Ch1 is the X axis and Ch2 is the Y axis for the RIGHT joystick. |
|
2) Ch3 is the Y axis and Ch4 is the X axis for the LEFT joystick. |
|
3) ‘abs(z)’ is the ABSOLUTE VALUE of ‘z’. |
|
|
|
MOTORS & SENSORS: |
|
* [Name] [Type] [Description] |
|
Motor - Port 2 rightMotor VEX Motor Right motor |
|
Motor - Port 3 leftMotor VEX Motor Left motor |
*----------------------------------------------------------------------------------------------------
/

//+++++++++++++++++++++++++++++++++++++++++++++| MAIN |+++++++++++++++++++++++++++++++++++++++++++++++
task main ()
{
int joy_x; // will hold the X value of the analog stick (choices below)
int joy_y; // will hold the Y value of the analog stick (choices below)
int threshold = 10; // helps to eliminate ‘noise’ from a joystick that isn’t perfectly at (0,0)

while(1 == 1)
{
	joy_x = vexRT[Ch4];   // This is the RIGHT analog stick.  For LEFT, change 'Ch1' to 'Ch4'.
	joy_y = vexRT[Ch3];   // This is the RIGHT analog stick.  For LEFT, change 'Ch2' to 'Ch3'.

	// Forward, and swing turns: (both abs(X) and abs(Y) are above the threshold, and Y is POSITIVE)
	if((abs(joy_x) > threshold) && (abs(joy_y) > threshold) && (joy_y > 0))
	{
		motor[leftfront]  = (joy_y + joy_x)/2;
		motor[leftback]  = (joy_y + joy_x)/2;
		motor[rightback] = (joy_y - joy_x)/2;
		motor[rightfront] = (joy_y - joy_x)/2;
	}
	// Backwards and swing turns: (both abs(X) and abs(Y) are above the threshold, and Y is NEGATIVE)
	else if((abs(joy_x) > 1) && (abs(joy_y) > threshold) && (joy_y < 0))
	{
		motor[leftfront]  = (joy_y - joy_x)/2;
		motor[leftback]  = (joy_y - joy_x)/2;
		motor[rightback] = (joy_y + joy_x)/2;
		motor[rightfront] = (joy_y + joy_x)/2;
	}
	// Turning in place: (abs(X) is above the threshold, abs(Y) is below the threshold)
	else if((abs(joy_x) > 1) && (abs(joy_y) < 1))
	{
		motor[leftback]  = joy_x;
		motor[leftfront]  = joy_x;
		motor[rightback] = (-1 * joy_x);
		motor[rightfront] = (-1 * joy_x);

	}
	// Standing still: (both abs(X) and abs(Y) are below the threshold)
	else
	{
		motor[leftback]  = 0;
		motor[leftfront]  = 0;
		motor[rightback] = 0;
		motor[rightfront]  = 0;
	}
}

}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Please help us out in finding errors in the program so we can quickly resolve our technical errors. We have a competition this week and would love to get in some practice time. Thank You!!!:)*

What issues specifically are you running into? What is the code doing, and what do you want it to do? The more detailed information you are able to provide on the issue, the better we will be able to assist you with the debugging process.

Thank you in advance!