Arduino code to control four servos with four push bottons

Kindly help in debug this code. The code is to control four servos in an angle given with four push bottons.

#include <Servo.h>
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int button1=0;
int button2=0;
int button3=0;
int button4=0;

Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;

float pos = 0;

void setup() {
myservo1.attach(6);
myservo2.attach(7);
myservo3.attach(8);
myservo4.attach(9);
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);

// set up the LCD's number of columns and rows:
lcd.begin(12, 2);
// Print a message to the LCD.
lcd.setCursor(4, 0);
lcd.print("WELCOME");
delay(1000);
lcd.clear();
lcd.setCursor(2, 0);
lcd.print("INITIALIZING");
lcd.setCursor(1, 2);
lcd.print("PLEASE WAIT...");
delay(100);
lcd.clear();
delay(100);
lcd.noCursor();
delay(100);
lcd.setCursor(2, 0);
lcd.print("SYSTEM READY");
delay(100);
lcd.clear();
}

void loop()
{
//code for fist button begins
button1=digitalRead(A0);
if(button1==HIGH)
{
for(pos; pos < 90&&button1==HIGH; pos +=2)
{
myservo1.write(pos);
delay(15);
button1=digitalRead(A0);
}
lcd.print("FILLED BUCKET 1");
}

if(button1==LOW)
lcd.print("FILLING BUCKET 1");
{
for(pos; pos>=0&&button1==LOW; pos-=2)
{
myservo1.write(pos);
delay(15);
button1=digitalRead(A0);
}
}
//code for fist button ends

//code for second button begins

button2=digitalRead(A1);
if(button2==HIGH)
{
for(pos; pos < 90&&button2==HIGH; pos +=2)
{
myservo2.write(pos);
delay(15);
button2=digitalRead(A1);
}
lcd.print("FILLED BUCKET 1");
}

if(button2==LOW)
lcd.print("FILLING BUCKET 1");
{
for(pos; pos>=0&&button2==LOW; pos-=2)
{
myservo2.write(pos);
delay(15);
button2=digitalRead(A1);
}
}
//code for second button ends
//code for Third button begins

button3=digitalRead(A1);
if(button3==HIGH)
{
for(pos; pos < 90&&button3==HIGH; pos +=2)
{
myservo3.write(pos);
delay(15);
button3=digitalRead(A2);
}
lcd.print("FILLED BUCKET 1");
}

if(button3==LOW)
lcd.print("FILLING BUCKET 1");
{
for(pos; pos>=0&&button3==LOW; pos-=2)
{
myservo3.write(pos);
delay(15);
button3=digitalRead(A2);
}
}
//code for third button ends

//code for Fourth button begins

button4=digitalRead(A3);
if(button4==HIGH)
{
for(pos; pos < 90&&button4==HIGH; pos +=2)
{
myservo4.write(pos);
delay(15);
button4=digitalRead(A3);
}
lcd.print("FILLED BUCKET 1");
}

if(button4==LOW)
lcd.print("FILLING BUCKET 1");
{
for(pos; pos>=0&&button4==LOW; pos-=2)
{
myservo4.write(pos);
delay(15);
button4=digitalRead(A3);
}
}
//code for fourth button ends
}
//end of void loop

What is the problem with the code besides it being posted improperly? Are there errors or does it compile, but not do what you expect?

Read the how to use this forum-please read sticky to see how to post code and advice on how to get the most from the forum.

myservo3.attach(8);

I never had any luck controlling a servo with the smiley face pin. There's a reason for code tags.

Hi seyinia, welcome.

I'm sorry to tell you, but this is not the way this forum works.
Please read the manual (click !) of this forum.
It'll tell you all you need to know on how to effectively use this forum, and that includes how to ask your questions in a way that will help responders help you.

At least you should tell what you think is wrong with the code you are showing here, what you expected to get, and what you got instead.

The code compiles just OK, so the compiler doesn't see any problem in it.
One problem i see in it, isn't a problem to the compiler (because you told it that's what you are wishing for), but it is likely a problem to you:
You are using nested blocking code by using a for loop, which contains delays.
That's seldom a good idea, so don't do that unless you know exactly what you are doing.
I didn't look further in you text, but that's already a real nice chunk for you to bite off.
The solution to it is in my sign off message below, as it is in any of my posts.
It'll take you a while to study and learn a lot, but it'll also be very worthwhile.

Well as a matter of fact i did look at your code again just now.
You seem to start filling buckets.
Do you ever plan on stopping that action ?

But you see, now i'm guessing as to what problems you might or might not have with it.
I don't like that.

Please tell us what lines like this are accomplishing for you?

for(pos; pos < 90&&button1==HIGH; pos +=2)