error: expected unqualified-id before 'if'

Hi, I'm new to Arduino, and I get, error: expected unqualified-id before 'if' when I try to compile the following code:

/Program to make a robot follow a light at varying speeds based on the brightness of the light.
Uses a microcontroller, battery, two photoresistors and two servos.
/
int sensorpina = 14; //left
int sensorpinb = 15; //right
int servopina = 0; //left
int servopinb = 1; //right

int val = 0; //left
int bval = 0; //right

void setup()
{
pinMode(servopina, OUTPUT); //left
pinMode(servopinb, OUTPUT); //right
}

void loop()
{
val = analogRead(sensorpina); //left
Serial.println(val); //left
val = analogRead(sensorpinb); //right
Serial.println(bval); //right
}

void loop()
{
if (sensorpina < sensorpinb); //meaning the light is to the right of the robot, this is the error line
{ //turn right
digitalWrite(servopina, HIGH); //left on
digitalWrite(servopinb, LOW); //right off
}
else if (sensorpina > sensorpinb); //meaning the light is to the left of the robot
{ //turn right
digitalWrite(servopina, LOW); //left off
digitalWrite(servopinb, HIGH); //right on
}
else if (sensorpina == sensorpinb) //meaning the light is ahead of the robot
{ //go straight
analogWrite(servopina, val/4); //left
analogWrite(servopinb, bval/4); //right
}
}

I know I made several obvious mistakes, so don't tell me what I already know about how bad it is, just tell me how to fix it and really anything to make it better.

I suggest you remove the semi-colon after the if's. It should be
if (something) { do something; }

You also have declared function loop() twice!

Are they really servos, as in R/C servos?
They don't normally like simple digital writes, or, for that matter, analogue ones.
Have a look at the servo library

Where's the servo library? (where can I find it)

Thanks, I'll try that. [smiley=dankk2.gif]