keypad coding 3x4 not working in void lopp

hello guys.. i have problem regarding my keypad coding..Its not working.. im doing a project interfacing a fingerprint scanner with the keypad..

this my keypad code with password:

{
  
            lcd.setCursor(0,0);
            lcd.print("Enter Password:");
            customKey = customKeypad.getKey();
  
            if (customKey){
            Data[data_count] = customKey; 
            lcd.setCursor(data_count,1); 
            lcd.print(Data[data_count]); 
            data_count++; 
            }

             if(data_count == Password_Length-1){
             lcd.clear();

             if(!strcmp(Data, Master)){
             lcd.print("Correct"); 
             delay(5000);
            }
        else{
            lcd.print("Incorrect");
             delay(1000);
            }
   
           lcd.clear();
           clearData();         
            }
void clearData(){
  while(data_count !=0){
    Data[data_count--] = 0; 
  }
  return;

this is my void loop :

void loop() 
{
 if(digitalRead(up)==0 || digitalRead(down)==0)
 {
  for(int i=0;i<5;i++)
    {
    lcd.clear();
    lcd.print("Place Finger");
    delay(2000);
    int result=getFingerprintIDez();
    if(result>=0)
       {
        digitalWrite(openLight, HIGH);
        digitalWrite(closeLight, LOW);
        lcd.clear();
        lcd.print("Verification no.");
        lcd.setCursor(0,1);
        lcd.print("has been send");
        delay(3000);
        lcd.clear();
        lcd.print("Please check");
        lcd.setCursor(0,1);
        lcd.print("your mobile");
        delay(3000);
        open_close_motor();
        delay(1000);
        lcd.clear();
        lcd.begin(16,2); 
        lcd.backlight();{
          {
  
            lcd.setCursor(0,0);
            lcd.print("Enter Password:");
            customKey = customKeypad.getKey();
  
            if (customKey){
            Data[data_count] = customKey; 
            lcd.setCursor(data_count,1); 
            lcd.print(Data[data_count]); 
            data_count++; 
            }

             if(data_count == Password_Length-1){
             lcd.clear();

             if(!strcmp(Data, Master)){
             lcd.print("Correct"); 
             delay(5000);
            }
        else{
            lcd.print("Incorrect");
             delay(1000);
            }
   
           lcd.clear();
           clearData();         
            }
        return;
      }
     }
   
  }
 checkKeys();
 delay(2000);
}

Any help fixing my void loop would be appreciate :smiley:

"Not working" is the worst possible description of your problem.
How is is not working? What do you expect to happen? What do you see happening?
post your entire sketch, not several pieces in their own code tags
+1 for using code tags!

Can you please post your complete code. Your loop() is incomplete (missing two closing curlies).

Thanks for using code tags in (your first post).

blh64:
"Not working" is the worst possible description of your problem.
How is is not working? What do you expect to happen? What do you see happening?
post your entire sketch, not several pieces in their own code tags
+1 for using code tags!

the keypad stuck in looping and no number shown up in LCD whenever i pressed..

sterretje:
Can you please post your complete code. Your loop() is incomplete (missing two closing curlies).

Thanks for using code tags in (your first post).

the attachment is my complete code :). feel free to check error and verify which part that i can improve..

P/S: credit to http://www.how2electronics.com/interfacing-fingerprint-sensor-with-arduino/, i took the code for my project and improvise by adding the GSM and keypad .,

Test_1-3.ino (12.2 KB)