The code appears to be fine. However I just had to fix the round parenthesis for you. 
Also the wait1Msec(20); at the end of the while loop is there because the cortex only updates the motors every 20ms anyway so you don’t need to over-update them.
Also removed that 100ms delay you had for the LCD. If you want to add that effectively then I would suggest using another task just for the LCD screen however updating every 20ms is fine.
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in1, gyroscope, sensorGyro)
#pragma config(Sensor, I2C_1, MotorLF, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, MotorLB, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_3, MotorRB, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_4, MotorRF, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port2, MotorLF, tmotorVex393HighSpeed_MC29, openLoop, encoderPort, I2C_1)
#pragma config(Motor, port3, MotorLB, tmotorVex393HighSpeed_MC29, openLoop, encoderPort, I2C_4)
#pragma config(Motor, port4, RightLift, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port5, LeftLift, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port6, hang, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port8, MotorRB, tmotorVex393HighSpeed_MC29, openLoop, reversed, encoderPort, I2C_3)
#pragma config(Motor, port9, MotorRF, tmotorVex393HighSpeed_MC29, openLoop, reversed, encoderPort, I2C_2)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#pragma platform(VEX)
//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(15)
#pragma userControlDuration(105)
#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;
}
/////////////////////////////////////////////////////////////////////////////////////////
// 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()
{
//extend the hanging bar out just a little to keep it from scraping the ground.
motor[port6] = 126;
wait1Msec(500);//wait .5 seconds
motor[port6] = 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.
/////////////////////////////////////////////////////////////////////////////////////////
//#define C1LX vexRT[Ch4]//define variable
//#define C1LY vexRT[Ch3]//define variable
//#define C1RX vexRT[Ch1]//define variable
task usercontrol()
{
bLCDBacklight = true;// Turn on LCD Backlight
string mainBattery, backupBattery;
motor[port6] = 126;//extend the hanging bar out just a little to keep it from scraping the ground.
wait1Msec(500);//wait .5 seconds
motor[port6] = 0;//stop
while (true)
{
//--LCD BATTERY PROGRAM
clearLCDLine(0);// Clear line 1 (0) of the LCD
clearLCDLine(1);// Clear line 2 (1) of the LCD
//--Display the Primary Robot battery voltage
displayLCDString(0, 0, "Primary: ");
sprintf(mainBattery, "%1.2f%c", nImmediateBatteryLevel/1000.0,'V'); //Build the value to be displayed
displayNextLCDString(mainBattery);
//--Display the Backup battery voltage
displayLCDString(1, 0, "Backup: ");
sprintf(backupBattery, "%1.2f%c", BackupBatteryLevel/1000.0, 'V'); //Build the value to be displayed
displayNextLCDString(backupBattery);
motor[port2] = vexRT[Ch3];
motor[port3] = vexRT[Ch3];
motor[port8] = vexRT[Ch2];
motor[port9] = vexRT[Ch2];
//+++++++++++++++++++++++++++++++++++++++++++++| Fast Movements |++++++++++++++++++++++++++++++++++++++++++++++
if(vexRT[Btn6UXmtr2] == 1)//If button 6U is prssed, the scoop will go up
{
motor[port4] = 126;
motor[port5] = -126;
}
else if(vexRT[Btn6DXmtr2] == 1)//If button 6D is prssed, the scoop will come down
{
motor[port4] = -126;
motor[port5] = 126;
}
else if(vexRT[Btn8UXmtr2] == 1)//If button 8U is prssed, the scoop will go up very slowly
{
motor[port4] = 40;
motor[port5] = -40;
}
else if(vexRT[Btn8DXmtr2] == 1)//If button 8D is prssed, the scoop will come down very slowly
{
motor[port4] = -40;
motor[port5] = 40;
}
else//The scoop will do nothing
{
motor[port5] = 0;//speed of 0
motor[port4] = 0;//speed of 0
}
//+++++++++++++++++++++++++++++++++++++++++++++| Hanging |++++++++++++++++++++++++++++++++++++++++++++++
if(vexRT[Btn5UXmtr2] == 1)//If button 5U is pressed, the hanging mechnaism will extend
{
motor[port6] = 126;
}
else if(vexRT[Btn5DXmtr2] == 1)//If button 5D is pressed, the hanging mechnaism will retract
{
motor[port6] = -126;
}
else//The hanging mechanism will do nothing
{
motor[port6] = 0;//speed of 0
}
wait1Msec(20);//I have no idea why I put this here, keepuntilyou can figure out it does ordoesn't do.
}
}