Line Sensors

My partner wrote this program for the line tracks on our robot. It doesn’t move not a single inch. any clues?

task autonomous()
{

int threshold = 1330 ;

SensorValue[LeftEncoder] = 0 ;
SensorValue[RightEncoder] = 0 ;

while(SensorValue[LeftEncoder] < 500)
{
	motor[LeftDrive] = 63;
	motor[RightDrive] = 63;

	motor[LeftIntake] = 127;
}

while(SensorValue[LeftLine] < threshold)
{
	motor[LeftDrive] = 100;
	motor[RightDrive] = 127;
}

while(SensorValue[LeftEncoder] > 15000)
{
	if(SensorValue[LeftLine] && SensorValue[RightLine] > threshold)
	{
		motor[LeftDrive] = 127;
		motor[RightDrive] = 127;
	}
	if(SensorValue[LeftLine] < threshold)
	{
		motor[LeftDrive] = 100;
		motor[RightDrive] = 127;
	}
	if(SensorValue[RightLine] < threshold)
	{
		motor[LeftDrive] = 127;
		motor[RightDrive] = 100;
	}
	if(SensorValue[RightLine] && SensorValue[LeftLine] < threshold)
	{
		motor[LeftDrive] = 127 ;
		motor[RightDrive] = 127 ;
	}
}

}

As you have task autonomous for what your code is within I assume that you are using the competition control template. Do you have a field control switch that you are switching to Enable - Autonomous to run the program? If not, just put the code in task main in a new program.

We are using the competition switch built into robotc. Could there be a problem and the cord or cortex not reading the switch?

What are the lights on the controller showing when you switch to autonomous?

To isolate the issue, I would try putting the code into the task main of a completely separate program, download that, and when you click start in the debugger it should run right away.