variable or field 'keypadEvent' declared void

im getting these errors now and dont know how to fix them can someone pls help.
thanks in advance. :wink:

-1: error: variable or field ‘keypadEvent’ declared void
-1: error: ‘KeypadEvent’ was not declared in this scope
29: error: expected constructor, destructor, or type conversion before ‘.’ token

#include <Password.h>
Password password = Password("846*");

#include <Keypad.h>
const byte ROWS = 4; //Four Rows
const byte COLS = 3; //Four Columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','8'},
  {'#','0','*'}
};
//Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = {7, 6, 5, 3};
//Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = {4, 3, 2}; 

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

//this wont change
const int TLB = 11;
const int TLBLight = 12;

//Variables
int TLBCount = 0;
int Buttonstate = 0;
int LastButtonstate =0;

keypad.addEventListener(keypadEvent);

void setup(){
  //Set Pins 2-8 To INPUT from Keypad 
  pinMode(2, INPUT); //Keypad Pin 1
  pinMode(3, INPUT); //Keypad Pin 2
  pinMode(4, INPUT); //Keypad Pin 4
  pinMode(5, INPUT); //Keypad Pin 3
  pinMode(6, INPUT); //Keypad Pin 5
  pinMode(7, INPUT); //Keypad Pin 6
  pinMode(8, INPUT); //Keypad Pin 7
  //Set Pins 9 and 10 To StepperDriver
  pinMode(9, OUTPUT); //Stepper DIR
  pinMode(10, OUTPUT);//Stepper STEP
  //Set Pins 11 and 12 to Tactile Light Button
  pinMode(TLB, INPUT); //TLB Button Press Watch
  pinMode(TLBLight, OUTPUT);//TLB Light Trigger 
  
  
}
void loop(){
  //reads pin 11 for double button press
  Buttonstate = digitalRead(TLB);
  if (Buttonstate != LastButtonstate) {
  //STart counting TLB Presses
  if (Buttonstate == HIGH){
      TLBCount++;
   }
    else{
      digitalWrite(TLBLight, LOW);//Dont lght when not pressed
    }
  }
  LastButtonstate = Buttonstate;
  //If doubltap on TLB start Looking for pincode form keypad
  if (TLBCount % 2 == 0){
    //Blink TLB light x3
    digitalWrite(TLBLight, HIGH);
    delay(550);
    digitalWrite(TLBLight, LOW);
    delay(250);
    digitalWrite(TLBLight, HIGH);
    delay(550);
    digitalWrite(TLBLight, LOW);
    delay(250);
    digitalWrite(TLBLight, HIGH);
    delay(550);
    digitalWrite(TLBLight, LOW);
    //Start looking for input on keypad. 
    keypad.getKey();
  }
}

void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
    case PRESSED:
	switch (eKey){
	  case '*': guessPassword(); break;
	  case '#': password.reset(); break;
	   default:
		   password.append(eKey);
     }
  }
} 

void guessPassword(){
     if (password.evaluate()){
	     //Blink TLB light x3
       digitalWrite(TLBLight, HIGH);
       delay(550);
       digitalWrite(TLBLight, LOW);
       delay(250);
       digitalWrite(TLBLight, HIGH);
       delay(550);
       digitalWrite(TLBLight, LOW);
       delay(250);
       digitalWrite(TLBLight, HIGH);
       delay(550);
       digitalWrite(TLBLight, LOW);
       //Replace with stepper code
     }else{
	     digitalWrite(TLBLight, HIGH);
             delay(750);
             digitalWrite(TLBLight, LOW);
     }
} 

    //move stepper __degrees one direction if stepper is at POINT A,
    //move the motor  __ degrees opposite direction if at POINT B.

You're using keypadEvent for a function, and KeypadEvent for a definition - could you have entered one where you expected to use the other?

Did you add the Keypad library into your “libraries” folder? Those look like the kind of errors you get when the library is missing.

first: CrossRoads, yes i have it in my libraries folder. but thanks

second: David, i tried putting it under the void setup like the examples i saw but i got the same error, ill try putting it in the void loop but i doubt ill get a different result. also thank you however.

Put both of your "#include"s at the very top, with nothing between them.

that was it AWOL. Thanks. any other suggestions?

I think I was on the right track! Having code before it made the keypad.h act like it was missing ...

managed to solve?

AndreCapitani: managed to solve?

Who are you talking to? Why did you revive a thread that has had no activity for nearly 7 years, to add nothing of value? Or even post a complete question.