Troubleshooting Code

This is the code for a 4 digit passcode lock that activates digital pins 12 and 13 on the arduino uno board after it has successfully registered each number in the correct order. Here is the code, but I dont believe the integer values are being recognised.

// Code is 4219 6 4 3 11
// The correct pin input will unlock the door for TEN seconds

const int buttonOne = 3;
const int buttonTwo = 4;
const int buttonThree = 5;

const int buttonFour = 6;
const int buttonFive = 7;
const int buttonSix = 8;

const int buttonSeven = 9;
const int buttonEight = 10;
const int buttonNine = 11;

const int ledBuzzer = 12;
const int solenoid = 13;

int pinNumber = 1;

void setup() {
pinMode(buttonOne, INPUT);
pinMode(buttonTwo, INPUT);
pinMode(buttonThree, INPUT);

pinMode(buttonFour, INPUT);
pinMode(buttonFive, INPUT);
pinMode(buttonSix, INPUT);

pinMode(buttonSeven, INPUT);
pinMode(buttonEight, INPUT);
pinMode(buttonNine, INPUT);

pinMode(ledBuzzer, OUTPUT);
pinMode(solenoid, OUTPUT);
}

void loop() {
if(pinNumber == 1) {
digitalWrite(ledBuzzer, LOW);
digitalWrite(solenoid, LOW);
if(digitalRead(buttonFour) == HIGH) {
pinNumber = 2;
}
}

if(pinNumber == 2) {
if(digitalRead(buttonOne) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonTwo) == HIGH) {
pinNumber = 3;
}
if(digitalRead(buttonThree) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFour) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFive) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSix) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSeven) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonEight) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonNine) == HIGH) {
pinNumber = 0;
}
}

if(pinNumber == 3) {
if(digitalRead(buttonOne) == HIGH) {
pinNumber = 4;
}
if(digitalRead(buttonTwo) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonThree) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFour) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFive) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSix) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSeven) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonEight) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonNine) == HIGH) {
pinNumber = 0;
}
}

if(pinNumber == 4) {
if(digitalRead(buttonOne) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonTwo) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonThree) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFour) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonFive) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSix) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonSeven) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonEight) == HIGH) {
pinNumber = 0;
}
if(digitalRead(buttonNine) == HIGH) {
pinNumber = 5;
}
}

if(pinNumber == 5) {
digitalWrite(ledBuzzer, HIGH);
tone(13,262,1000);
digitalWrite(solenoid, HIGH);
delay(10000);
pinNumber = 1;
}
}

Please edit your post and add
** **[code]** **
before your code and
** **[/code]** **
after your code.

For debugging, use Serial.print/println at strategic places in your code.

What happens when you press all the switches in the code at once?
Does that tell you anything?