I think the code looks fine (next time use the CODE tags by clicking the “</>” button so it’s easier to read), and the doubled while loops are not necessary but shouldn’t have an effect. Are you sure that the motors in question and their ports on the cortex are working? Try a really simple program to test each port individually, something like this for each motor:
If the rest of your code doesn’t respond either, then this might be your problem. You are missing the curly braces { } for the second while loop (which you don’t even need, because it has the same function as the first one). When a loop of any kind does not have curly braces immediately following it, only the line immediately after the loop is inside the loop. Therefore, your Cortex treats the code as though this is it:
task usercontrol()
{
while (true)
{
while (1 == 1)
{
motor[RightMotor] = vexRT[Ch2];
}
motor[LeftMotor] = vexRT[Ch3];
//rest of code, this is all that matters
Because 1==1 is always true, you never exit the loop containing the right motor control. That particular feature is occasionally useful, but I usually find it really irritating. To fix this, remove the