Error: expected primary-expression before '.' token

Hi, I am trying to make code for a keypad and I keep getting these errors when trying to upload my code. Could someone help correct this? I am putting the verbose output and the code below.

 In function 'void loop()':

sketch_dec25b:32:22: error: expected primary-expression before '.' token

   keypressed = Keypad.getKey();

                      ^

sketch_dec25b:39:42: error: lvalue required as left operand of assignment

         keypressed = '8' || keypressed = '9'  )

                                          ^~~

sketch_dec25b:45:10: error: expected '(' before 'tempPassword'

       if tempPassword == password

          ^~~~~~~~~~~~

sketch_dec25b:47:7: error: expected '}' before 'else'

       else

       ^~~~

C:\Users\Desktop\sketch_dec25b\sketch_dec25b.ino: At global scope:

sketch_dec25b:61:1: error: expected declaration before '}' token

 }

 ^

Multiple libraries were found for "Keypad.h"
 Used: C:\Users\Documents\Arduino\libraries\Keypad
Using library Keypad at version 3.1.1 in folder: C:\Users\aksha\Documents\Arduino\libraries\Keypad 
exit status 1
expected primary-expression before '.' token
#include <Keypad.h>
int buzzer = 11;
int CorrectLED = 12;
String password = "2468";
String tempPassword = "";
const byte ROWS = 4;
const byte COLS = 4;
char keypressed;
//define the symbols onbottom of keypad
char hexaKeys[ROWS][COLS] = {
  {'4', '5', '6', 'B'},
  {'1', '2', '3', 'A'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[ROWS] = {9, 8, 7, 6}; //Row pinouts
byte colPins[COLS] = {5, 4, 3, 2}; //Column pinouts

Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup()
{
  Serial.begin(9600);
  pinMode(buzzer, OUTPUT);
  pinMode (CorrectLED, OUTPUT);

}

void loop()
{
  keypressed = Keypad.getKey();
  if (keypressed)
    Serial.println(keypressed);
  if (keypressed != NO_KEY)
  {
    if (keypressed == '0' || keypressed == '1' || keypressed = '2' || keypressed = '3' ||
        keypressed = '4' || keypressed = '5' || keypressed = '6' || keypressed = '7' ||
        keypressed = '8' || keypressed = '9'  )
    {
      tempPassword += keypressed;
    }
    if (keypressed == '*')
    {
      if tempPassword == password
      digitalWrite (CorrectLED, HIGH);
      else
        digitalWrite (buzzer, HIGH);
    }
    if (keypressed == '#')
    {
      tempPassword = "";
      digitalWrite (CorrectLED, LOW);
      digitalWrite (buzzer, LOW);


    }


  }
}

Thanks
AK

Your keypad is called customKeypad not keypad.

wildbill: Your keypad is called customKeypad not keypad.

That solved it, thanks!

Another thing, = and == are not the same thing.

if (keypressed == '0' || keypressed == '1' || keypressed = '2' || keypressed = '3' ||
        keypressed = '4' || keypressed = '5' || keypressed = '6' || keypressed = '7' ||
        keypressed = '8' || keypressed = '9'  )

And not using parentheses and brackets is not a good habit to get in to

if (keypressed == '*')
    {
      if tempPassword == password
      digitalWrite (CorrectLED, HIGH);
      else
        digitalWrite (buzzer, HIGH);
    }

"Another thing, = and == are not the same thing. "

And will cause all kinds of grief!