For your autonomous code to work, you need to have a competition switch, which can be purchased here: http://www.vexrobotics.com/vexedr/products/competition-products/276-2335.html
Alternatively, if you have a wireless programming kit (available to purchase here: http://www.vexrobotics.com/vexedr/products/accessories/electronics/276-2186.html )
If you use the wireless programming kit, then you should connect it correctly then go to Robot >> Advanced Tools >> VEXNet Joystick Viewer on your RobotC software. This has a built-in competition switch