unqualified ID error

hey all-
I’m getting the following error message when I try to compile the following bit of code:

error: expected unqualified-id before numeric constant In function ‘void loop()’:

I’ve been staring at it for a while and can’t seem to find the problem. Please be the first to tell me where I’m being a retard.

Thanks!

Cory

Here’s my code:

//this program is designed to control the extension of a linear actuator based on the rotation of a pot
//from the previous program, I have added calibration points to set actuator length in given ranges

#define MotorL1 3
#define MotorL2 4
#define MotorPWM 5
int RotPot=1;// rotation pot is pin 1
int SlidePot=2;// slide pot is pin 2
int RotPotVal=0;// stores rotational pot value
int SlidePotVal=0;// stores slide pot value
int PWMSpeed=75;//sets speed of linear actuator to assigned value (1 to 254)
int LinCalA=200
int LinCalB=400
int LinCalC=600
int LinCalD=800
int LinCalE=1000

void setup(){
pinMode(MotorL1, OUTPUT);// defines MotorL1 as output
pinMode(MotorL2,OUTPUT);// defines MotorL2 as output
pinMode (MotorPWM, OUTPUT);// MotorPWM is PWM output
pinMode(RotPot, INPUT);// RotPot pin is an input
pinMode(SlidePot, INPUT);//SlidePot is an input
Serial.begin (9600);
}
void loop(){
RotPotVal=analogRead(RotPot);// sets RotPotVal to current reading
//Serial.print(RotPotVal);// test print RotPotVal
SlidePotVal=analogRead(SlidePot);//sets SlidePotVal to current reading
//Serial.print (SlidePotVal);// test print SlidePotVal

if (RotPotVal < 600)//if rot pot is less than 600 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{
if (SlidePotVal >= (LinCalA + LinAcc) ) //if slide is too high, go down
{
digitalWrite(MotorL1,HIGH);// L1 to REV setting
digitalWrite(MotorL2, LOW);// L2 to REV setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
else if (SlidePotVal <= (LinCalA - LinAcc)) //if slide too low, go up
{
digitalWrite(MotorL1,LOW);// L1 to FWD setting
digitalWrite(MotorL2, HIGH);// L2 to FWD setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
else //if slide is in the right place, stop
{
digitalWrite( MotorL1 , LOW);// L1 to STOP setting
digitalWrite( MotorL2, LOW);// L2 to STOP setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
}

else //if rot pot is greater than 600 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{
if (SlidePotVal >= (LinCalD + LinAcc) ) //if slide is too high, go down
{
digitalWrite(MotorL1,HIGH);// L1 to REV setting
digitalWrite(MotorL2, LOW);// L2 to REV setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
else if (SlidePotVal <= (LinCalD - LinAcc)) //if slide too low, go up
{
digitalWrite(MotorL1,LOW);// L1 to FWD setting
digitalWrite(MotorL2, HIGH);// L2 to FWD setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
else //if slide is in the right place, stop
{
digitalWrite(MotorL1,LOW);// L1 to STOP setting
digitalWrite(MotorL2, LOW);// L2 to STOP setting
analogWrite(MotorPWM,PWMSpeed);//PWM speed per PWMSpeed variable
}
}
}

Semicolons. Missing.

int LinCalA=200
int LinCalB=400
int LinCalC=600
int LinCalD=800
int LinCalE=1000

forgot to mention that when the error shows up, it highlights the second line of code:

define MotorL2 4

Thanks AWOL!
That worked! I knew I had to be doing something stupid.

Glad it's OK

Can I suggest some consistent indentation? Please?

BTW, what's the value of LinAcc?

I copied and pasted the code in, so all indentation was lost. Yea, noticed that the LinAcc variable was left out.

Thanks again.

when inserting code... use the code blocks.

Look for the "#" symbol in the menu bar when creating a post to the forum.

The CODE BLOCK will maintain most of the code formatting.

IE; It looks like this:

THIS IS YOUR CODE

     indented even...