Competition switch

im working with the competition template and when i switch it to driver mode it only goes to atonamous code.

#pragma config(Sensor, dgtl1,  green,          sensorLEDtoVCC)
#pragma config(Sensor, dgtl2,  yellow,         sensorLEDtoVCC)
#pragma config(Sensor, dgtl3,  red,            sensorLEDtoVCC)
//*!!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;
  
		SensorValue(red) = 1;
	  SensorValue(yellow) = 0;
		SensorValue(green) = 0;

	// 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()
{
  // .....................................................................................
  // Insert user code here.
  // .....................................................................................
		SensorValue(red) = 0;
	  SensorValue(yellow) = 1;
	  wait(0.25);
	  SensorValue(yellow) = 0;
	  wait(0.25);
	  SensorValue(yellow) = 1;
	  wait(0.25);
	  SensorValue(yellow) = 0;
	  wait(0.25);
	  SensorValue(yellow) = 1;
	  wait(0.25);
	  SensorValue(yellow) = 0;
	  wait(0.25);
	  SensorValue(yellow) = 1;
	  wait(0.25);
		SensorValue(green) = 0;
}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 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()
{
	// User control code here, inside the loop


		SensorValue(red) = 0;
	  SensorValue(yellow) = 1;
		SensorValue(green) = 1;
  
	 
}

when its starts it should turn red led on port 3 on
when its on aton it should turn yellow led on port 2 on
when its on driver it should turn green led on port 1 on

The code seems to work correctly. Is the game LED changing on the joystick correctly, flashing green during autonomous, solid green during driver control?