RobotC Autonomous Not Working

Recently my team has started using RobotC so we could use a Smart Motor control to keep our motors from dying. But after spending a few weeks we have got our Operator control to work but our Autonomous is not working, it is being very odd. It will only run for less than a sec (even though it should go longer). Anyone have any ideas? Any help would be appreciated.

#pragma config(Motor,  port2,           leftMotor2,    tmotorVex393_MC29, openLoop, reversed, driveLeft)
#pragma config(Motor,  port3,           rightMotor3,   tmotorVex393_MC29, openLoop, driveRight)
#pragma config(Motor,  port4,           leftMotor4,    tmotorVex393_MC29, openLoop, reversed, driveLeft)
#pragma config(Motor,  port5,           rightMotor5,   tmotorVex393_MC29, openLoop, driveRight)
#pragma config(Motor,  port6,           Claw,          tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           ArmH,          tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           ArmL,          tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include "SmartMotorLib.c"
#include "Vex_Competition_Includes.c"

void pre_auton()
	bStopTasksBetweenModes = true;

task autonomous()
	motor[leftMotor2]  = 127;
	motor[rightMotor3] = 127;
	motor[leftMotor4]  = 127;
	motor[rightMotor5] = 127;


task usercontrol()
	while (true)

		SetMotor( leftMotor2,  vexRT Ch2 ] );
		SetMotor( rightMotor3, vexRT Ch3 ] );
		SetMotor( leftMotor4,  vexRT Ch2 ] );
		SetMotor( rightMotor5, vexRT Ch3 ] );

You need to use SetMotor rather than motor if using the smart motor library.
As you have the bStopTasksBetweenModes flag set, you should also add SmartMotorRun() at the beginning of autonomous and usercontrol rather than in the pre_auton function.