X-Drive Program Problem

Hello my team and I have found a problem. We have a x-drive and were trying to program it to move during driver control. We have tried many programs to try to move it. Out of all our attempts only one wheel moves. It is in port one. So in our failed attempts we had asked our other teams at our school. They have the same program and x-drives. Except theirs works. We have tested the motor controllers and motors they work. So, we decided to get a new cortex but it too has the same problem. Please help us. And Thank you. Here is our code:

#pragma config(Motor, port1, leftfront, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port7, rightfront, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, leftrear, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, rightrear, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
{

//x-drive

while (1==1)

motor[leftfront] = vexRT[Ch3] + vexRT[Ch1] - vexRT[Ch4];
motor[rightfront] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
motor[leftrear] = vexRT[Ch3] + vexRT[Ch1] + vexRT[Ch4];
motor[rightrear] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];

}

It look like the community has already answered this, however, let me show you your code with some formatting applied.

task main()
{
    //x-drive
    while (1==1)
        motor[leftfront] = vexRT[Ch3] + vexRT[Ch1] - vexRT[Ch4];





    motor[rightfront] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
    motor[leftrear] = vexRT[Ch3] + vexRT[Ch1] + vexRT[Ch4];
    motor[rightrear] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];
}

notice how I have indented the first motor statement but none of the others, this is because a while statement will only execute one following statement, what we have to do is make what is called a “compound statement” or “block” by using braces like this.

task main()
{
    //x-drive
    while (1==1)
        {
        motor[leftfront] = vexRT[Ch3] + vexRT[Ch1] - vexRT[Ch4];
        motor[rightfront] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
        motor[leftrear] = vexRT[Ch3] + vexRT[Ch1] + vexRT[Ch4];
        motor[rightrear] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];
        }
}

now all four motor commands will be executed.