irrecv does not name a type

this error keeps showing up irrecv does not name a type plz help here is my code

#include <IRremote.h>
int Servopin=5;
int RECV_PIN = 6;

long KEY_1 = 0x00FF30CF;
long KEY_2 = 0x00FF18E7;
long KEY_3 = 0x00FF7A85;
long KEY_4 = 0x00FF10EF;
long KEY_5 = 0x00FF38C7;
long KEY_6 = 0x00FF5AA5;
long KEY_7 = 0x00FF42BD;
long KEY_8 = 0x00FF4AB5;
long KEY_9 = 0x00FF52AD;

IRrecv irrecv(RECV_PIN);
decode_results results;
int Position;
**void setup() { **
__
// initialize the digital pin as an output.
__
** pinMode(RECV_PIN, INPUT);
__
pinMode(Servopin,OUTPUT);__
__
irrecv.enableIRIn(); // Start the receiver**__
}
void loop() {
** int i=0;**
** if (irrecv.decode(&results))**
** {**
** irrecv.resume(); // Receive the next value**
** if (results.value == KEY_1 )
__
{__
__
Position=1;__
__
}__
else if (results.value == KEY_2 )
__
{__
__
Position=2;__
__
}__
else if (results.value == KEY_3 )
__
{__
__
Position=3;__
__
}__
else if (results.value == KEY_4 )
__
{__
__
Position=4;__
__
}__
else if (results.value == KEY_5 )
__
{__
__
Position=5;__
__
}__
else if (results.value == KEY_6 )
__
{__
__
Position=6;__
__
}__
else if (results.value == KEY_7 )
__
{__
__
Position=7;__
__
}__
else if (results.value == KEY_8 )
__
{__
__
Position=8;__
__
}__
__
else**__
** Position=9;**
** } **
__ int angle=Position*(180/9);//Calculate the angle should be moved based on the key pushed on the Remote Controller.__
** for(int i=0;i<=5;i++)**
** {**
** moveangle(Servopin,angle);//move the shaft to an angle based on the key pushed on the Remote Controller**
** }**
}
void moveangle(int Servopin,int angle)//the pulsewidth function,move the shaft to an angle based on the KEY pushed.
{
int pulsewidth=(angle*11)+500;//change the angle to 500-2480us pulsewidth
digitalWrite(Servopin,HIGH);
delayMicroseconds(pulsewidth);
digitalWrite(Servopin,LOW);
delay(20-pulsewidth/1000);
}

Does it say irrecv doesn't name a type or IRrecv doesn't name a type?

Where did you install the library?

Compiles fine for me. Sounds like your copy of the IRremote library is not installed correctly.

Pro tip: Code of the form:

if (var == integerconstant1)
    code1;
else if (var == integerconstant2)
    code2;
else if (var == integerconstan3)
    code3;
else if (var == integerconstan4)
    code4;
else if (var == integerconstant5)
    code5;

Can be simplified somewhat with the 'switch' statement:

switch (var) {
case integerconstant1:
    code1;
    break;

case integerconstant2:
    code2;
    break;

case integerconstant3:
    code3;
    break;

case integerconstant4:
    code4;
    break;

case integerconstant5:
    code5;
    break;
}

thank al ot