Undefined reference

I wrote this code and I am not able to upload to the Arduino Board. What can I do to fix this issue? Thank you for your help.

#include <Servo.h>
Servo myServo;
const int b1=11;
const int b2=10;
const int b3=9;
const int b4=7;
const int b5=4;
int val=0;
int bs1=0;
int bs2=0;
int bs3=0;
int bs4=0;
int bs5=0;
int pbs1=0;
int pbs2=0;
int pbs3=0;
int pbs4=0;
int pbs5=0;
const int blueLed=5;
const int redLed=3;
const int piezo=8;
const int greenLed=6;


void setup() {
pinMode(2, OUTPUT);
pinMode(b1, INPUT);
pinMode(b2, INPUT);
pinMode(b3, INPUT);
pinMode(b4, INPUT);
pinMode(b5, INPUT);
myServo.attach(2);
myServo.write(90);
pinMode(redLed, OUTPUT);
pinMode(blueLed, OUTPUT);
pinMode(piezo, OUTPUT);
pinMode(greenLed, OUTPUT);
}

void loop() {
bs1=digitalRead(b1);
bs2=digitalRead(b2);
bs3=digitalRead(b3);
bs4=digitalRead(b4);
bs5=digitalRead(b5);
//code 12345
static int buttonCounter = 0;
if(pbs1!=bs1){
  if(bs1==HIGH){
    buttonCounter=buttonCounter+1;

    if(val==0){
      val=1;
    }
  }

}
pbs1=bs1;

if(pbs2!=bs2){
  if(bs2==HIGH){
    buttonCounter=buttonCounter+1;
    if(val==1){
      val=2;
    }
  }

}
pbs2=bs2;

if(pbs3!=bs3){
  if(bs3==HIGH){
    buttonCounter=buttonCounter+1;
    if(val==2){
      val=3;
    }
  }

}
pbs3=bs3;

if(pbs4!=bs4){
  if(bs4==HIGH){
    buttonCounter=buttonCounter+1;
  }
  if(val==3){
    val=4;
  }

}
pbs4=bs4;

if(pbs5!=bs5){
  if(bs5==HIGH){
    buttonCounter=buttonCounter+1;
    if(val==4){
      val=5;
    }
  }

}
pbs5=bs5;
if(val==5 && buttonCounter==5){
  myServo.write(0);
  analogWrite(redLed, 0);
  analogWrite(blueLed, 0);
  analogWrite(greenLed, 100);
  val=0;
  buttonCounter=0;
  delay(5000);
     analogWrite(redLed, 0);
  analogWrite(blueLed, 0);
  analogWrite(greenLed, 0);
  myServo.write(90);
}
else if(val!=5&&buttonCounter==5){
    for(int i=0; i<5; i++){
      analogWrite(redLed, 250);
  analogWrite(blueLed, 0);
  tone(8, 440, 200);
  delay(200);
 analogWrite(blueLed, 20);
  analogWrite(redLed, 0);
  tone(8, 587, 200);
  delay(200);
      
    
}
  val=0;
  buttonCounter=0;
  analogWrite(redLed, 0);
  analogWrite(blueLed, 0);
    analogWrite(greenLed, 0);

}

}

The error message is attached below. Why doesn’t this work? Thanks

errormessage.txt (6.63 KB)

Compiles on 1.06 IDE

Learn to use CTRL T to format your code.

C:\Users\oksana\Desktop\arduino-1.7.8/Lock_attempt.ino:26: undefined reference to `pinMode’

Where did you get 1.7.8? Not from arduino.cc, so this is NOT the appropriate place for you to be asking about it.