Servo Does Not Name a type. WHY?????

I KEEP GETTING THE ERROR “SERVO DOES NOT NAME A TYPE” WHEN COMPILING! WHY?

#include <Servo.h>

//Pins
int PirF = 3;
int BootTime = 30;
int clearencemax = 5; 
int mouth = 13;
int SonicFtrig = 41 ;
int SonicFecho = 40 ;
int piron = 0;

Servo RightServo;
Servo LeftServo;

RightServo.attach(8);
LeftServo.attach(7);
//Functions
void moveturn() {
//Full Turn Around
}

void movestop() {

LeftServo.write(90);

RightServo.write(90);
  
}

void moveforward() {
//Full speed ahead
  
}

void scanforlife() {
movestop();
delay(1000);
piron = digitalRead(PirF);

if (piron= HIGH) {}

}

void speak() {
digitalWrite(mouth, HIGH);
//Put Emic Code here
}

void shootgun() {
//Shoot the water gun!
}

  //Warm up sensors
void setup(){
  Serial.begin(9600);
  pinMode(PirF, INPUT);
  digitalWrite(PirF, LOW);
//Booting stuff
  Serial.print("booting systems ");
    for(int i = 0; i < BootTime; i++){
      Serial.print(".");
      delay(1000);
      }
    Serial.println(" done");
    Serial.println("ACTIVE");
    delay(50);
  }


void loop() {
  //HCSR04 Stuff
 long duration, distance;
  digitalWrite(SonicFtrig, LOW);  // Added this line
  delayMicroseconds(2); // Added this line
  digitalWrite(SonicFtrig, HIGH);
//  delayMicroseconds(1000); - Removed this line
  delayMicroseconds(10); // Added this line
  digitalWrite(SonicFtrig, LOW);
  duration = pulseIn(SonicFecho, HIGH);
  distance = (duration/2) / 29.1;
  if (distance < clearencemax) {

delay(10);
scanforlife();

}

else {
  moveforward();

}

}

HELP! PLEASE! WHAT IS WRONG???!!!

Your cap-lock key needs fixing.

Mark

RightServo.attach(8);
LeftServo.attach(7);

These two lines need to be inside a function.

Delta_G:

RightServo.attach(8);

LeftServo.attach(7);




These two lines need to be inside a function.

OK, will try it and get back to you!