robot c bang bang problem

can anyone help us with this code we are having problems with the bang bang code and the lcd rpm is not compiling here is the code

#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, dgtl1, touch, sensorTouch)
#pragma config(Sensor, I2C_1, fly1Eval, sensorQuadEncoderOnI2CPort, , AutoAssign)
#pragma config(Sensor, I2C_2, fly2Eval, sensorQuadEncoderOnI2CPort, , AutoAssign)
#pragma config(Motor, port1, intake, tmotorVex393HighSpeed_HBridge, openLoop, reversed)
#pragma config(Motor, port2, fly1, tmotorVex393HighSpeed_MC29, openLoop, encoderPort, I2C_1)
#pragma config(Motor, port3, d1, tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port4, d3, tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port5, d2, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port6, d4, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port9, fly2, tmotorVex393HighSpeed_MC29, openLoop, reversed, encoderPort, I2C_2)
#pragma config(Motor, port10, intake2, tmotorVex393HighSpeed_HBridge, openLoop)
#pragma config(UART_Usage, UART2, uartVEXLCD, baudRate19200, IOPins, None, None)
#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!

int distance;
int leftencoder = 0;
int rightencoder = 0;
int encoderavg1 = 0;
int encoderavg2 = 0;
int eps = 0;
int rpm = 0;

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;
// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, …
}

task autonomous()
{
{
motor[fly1] = 80;
motor[fly2] = 80;
motor[d1] = -70;
motor[d2] = -70;
motor[d3] = -70;
motor[d4] = -70;
distance = distance + 1;
}
motor[d1] = -100;
motor[d2] = -100;
motor[d3] = -100;
motor[d4] = -100;
wait1Msec(300);
distance = distance / 2;
motor[d1] = 0;
motor[d2] = 0;
motor[d3] = 0;
motor[d4] = 0;
wait1Msec(300);
motor[intake] = 50;
motor[intake2] = 50;
motor[fly1] = 80;
motor[fly2] = 80;
wait1Msec(5000);
motor[fly1] = 0;
motor[fly2] = 0;
motor[intake] = 0;
motor[intake2] = 0;
{
motor[d1] = 100;
motor[d2] = 100;
motor[d3] = 100;
motor[d4] = 100;
distance = distance - 1;
}
motor[d1] = 0;
motor[d2] = 0;
motor[d3] = 0;
motor[d4] = 0;
}

task usercontrol()
{
SensorValue[fly1Eval] = 0;
SensorValue[fly2Eval] = 0;
bLCDBacklight = true;
clearLCDLine(0); clearLCDLine(1);
while (true)
{

motor[d1] = vexRT[Ch2];
motor[d3] = vexRT[Ch2];
//Left side of the robot is controlled by the left joystick, Y-axis
motor[d2] = vexRT[Ch3];
motor[d4] = vexRT[Ch3];

if(vexRT[Btn6U] == 1)
{
int targetrpm = 3000;
leftencoder = abs(SensorValue[fly1Eval]);
rightencoder = abs(SensorValue[fly2Eval]);
encoderavg1 = (leftencoder + rightencoder)/2;
wait(100);
leftencoder = abs(SensorValue[fly1Eval]);
rightencoder = abs(SensorValue[fly2Eval]);
encoderavg2 = (leftencoder + rightencoder)/2;
eps = encoderavg2 - encoderavg1;
rpm = (eps/10)1060;

clearLCDLine(0); clearLCDLine(1);
displayLCDString(0, 0, "RPM: ");
displayLCDString(1, 0, rpm);

 if (rpm < targetrpm){
 motor[fly1] = 127;
 motor[fly2] = 127;
}
if (rpm >= targetrpm){
motor[fly1] = 70;
           motor[fly2] = 70;
 }

delay(100);
motor[fly1] = 127;
motor[fly2] = 127;
}

if(vexRT[Btn6D] == 1)

{
motor[fly1] = 127;
motor[fly2] = 127;

}
if(vexRT[Btn6U] == 0 && vexRT[Btn6D]==0)
{
motor[fly1] = 0;
motor[fly2] = 0;
}
if(vexRT[Btn5U] == 1)
{
motor[intake] = 100;
motor[intake2] = -100;
}

  if(vexRT[Btn5D] == 1)
{
	motor[intake] = -127;
	motor[intake2] = 127;
  }
if(vexRT[Btn5U] == 0 && vexRT[Btn5D] ==0)
{
	motor[intake] = 0;
	motor[intake2] = 0;

}

}

}

well with one error your wait(100) your missing wait1Msec or wait10Msec.

displayLCDString(1, 0, rpm);
well rpm isnt a string

If you want to write a number either format a string correctly or use the displayLCDNumber function.

displayLCDNumber(1, 0, rpm);