Need help on code for keypad password authenticating ... PLS HELP

i got problem where i need to evaluate password, if password is typed thrice wrong. an alarm must be trigged…
below is my code… pls help.

/////////////////////////////////////////////////////////////////

#include <Password.h> //http://www.arduino.cc/playground/uploads/Code/Password.zip
#include <Keypad.h> //http://www.arduino.cc/playground/uploads/Code/Keypad.zip

Password password = Password( "65B9" );

#define AlarmWrong 10
const byte ROWS = 4; // Four rows
const byte COLS = 4; //  columns
// Define the Keymap
char keys[ROWS][COLS] = {
 {'1','2','3','A'},
 {'4','5','6','B'},
 {'7','8','9','C'},
 {'*','0','#','D'}
};

byte rowPins[ROWS] = {
32,31,30,29 };     //connect to the row pinouts of the keypad
byte colPins[COLS] = {
 25,26,27,28};     //connect to the column pinouts of the keypad



// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
pinMode(AlarmWrong, OUTPUT);
 Serial.begin(9600);
 keypad.addEventListener(keypadEvent); //add an event listener for this keypad
}

void loop(){
 keypad.getKey();


}


//take care of some special events
void keypadEvent(KeypadEvent eKey){
 switch (keypad.getState()){
   case PRESSED:
Serial.print("Pressed: ");
Serial.println(eKey);
switch (eKey){
 case 'A': checkPassword(); break;
 case '3': password.reset(); break;
 default: password.append(eKey);
    }
 }
}
void checkPassword(){
int x =0;
 if (password.evaluate()){
   Serial.println("Success");
   //Add code to run if it works
 
 }
  
else {
 x++;
Serial.print("wrong");

}
if(x==3){
 alarm();
}
}

void alarm(){
 Serial.print("trigger alarm");
int x=0;
}


Regards

GOWTHAM

Please edit your post, select the code, and put it between [code][/code] tags.

You can do that by hitting the “Code” icon above the posting area. It is the first icon, with the symbol: </>

Please use code tags.

Read this before posting a programming question

How to use this forum

??????????

below is my code.. pls help.

What happens? What do you expect to happen?