While loop, error .... SOLVED

hey guys i have a huge code .... but some small part of it give me problems

i have 6 push buttons
arduino imput have the GND
look at picture ...below

what i want .... to move a stepper motor to a position manually
in the while loop i whant to increment or decrement the led (PWM) with two buttons up and down
when i exit the while loop ... to set the value to 0

what i get.....
when i enter the main while loop .... the code enter in both IF, inside the while ..... causing me 0 1 0 1 0 1 0 and so on

const int buttonPinEnter = 8;   // pin for the Enter button
const int buttonPinLeft = 9;      // pin for the Up button
const int buttonPinUp = 11;   // pin for the Enter button
const int buttonPinDown = 12;   // pin for the Enter button
const int buttonPinRight = 13;    // pin for the Down button
const int buttonPinEsc = 14;     // pin for the Esc button
int i=0;

  pinMode(buttonPinLeft, INPUT);
  pinMode(buttonPinRight, INPUT);
  pinMode(buttonPinEnter, INPUT);
  pinMode(buttonPinEsc, INPUT);
  pinMode(buttonPinUp, INPUT);
  pinMode(buttonPinDown, INPUT);
  pinMode(LedRosu, OUTPUT);
  pinMode(LedGalben, OUTPUT);
  pinMode(LedVerde, OUTPUT);
  pinMode(Buzzer, OUTPUT);

the part of the code what give me problems ..

  while (newMenuItem.getName()=="motorA"){
          lcd.setCursor(0,0); //primul rand  
          lcd.print(" ALEGE-MOTOR A");
          tone(Buzzer,Eb8,Q);
      if(digitalRead(buttonPinUp) == HIGH);
           {
            i++;    
                  payload.A = i * 10;
                  payload.B = 0;
                  payload.C = 0;
                  payload.D = 0;
                  payload.E = 0;
                  payload.F = 0;     
                  payload.G = 0; 
                  lcd.clear();
                  lcd.setCursor(0,1); //primul rand  
                  lcd.print(i);  
                  trimitere();
                  if (digitalRead(buttonPinEsc)== HIGH){break; i=0;} 
                  digitalWrite(LedRosu, LOW);
                  digitalWrite(LedGalben, HIGH);
                  analogWrite(LedVerde, i);    
                 } 
      if(digitalRead(buttonPinDown) == HIGH); 
           {
            i--;
                  payload.A = i * 10;
                  payload.B = 0;
                  payload.C = 0;
                  payload.D = 0;
                  payload.E = 0;
                  payload.F = 0;     
                  payload.G = 0;
                  lcd.clear(); 
                  lcd.setCursor(0,1); //primul rand  
                  lcd.print(i);    
                  trimitere();
                  if (digitalRead(buttonPinEsc)== HIGH){break; i=0;} 
                  digitalWrite(LedRosu, LOW);
                  digitalWrite(LedGalben, HIGH);
                  analogWrite(LedVerde, i);   
                 } 
            
   if (digitalRead(buttonPinEsc)== HIGH){break; i=0;}
  }

i olso tried

  while (newMenuItem.getName()=="motorC"){
          lcd.clear();
          lcd.setCursor(0,0); //primul rand  
          lcd.print(" ALEGE-MOTOR C");
          //lcd.setCursor(0,1); //primul rand  
          //lcd.print("   <- DA ->   ");  // 1< 2> 3/\ 4\/
      tone(Buzzer,Eb8,Q);
      i=0;
      while (digitalRead(buttonPinUp) == HIGH);
           {
            i++;
                  payload.A = 0;
                  payload.B = 0;
                  payload.C = i * 10;
                  payload.D = 0;
                  payload.E = 0;
                  payload.F = 0;     
                  payload.G = 0;
                  lcd.clear();
                  lcd.setCursor(0,1); //primul rand  
                  lcd.print(payload.C);  
                  trimitere();
                  if (digitalRead(buttonPinEsc)== HIGH){break; i=0;} 
                  digitalWrite(LedRosu, LOW);
                  digitalWrite(LedGalben, HIGH);
                  analogWrite(LedVerde, i);   
                 } 
      while (digitalRead(buttonPinDown) == HIGH); 
           {
           i++;
                  payload.A = 0;
                  payload.B = 0;
                  payload.C = i * -10;
                  payload.D = 0;
                  payload.E = 0;
                  payload.F = 0;     
                  payload.G = 0; 
                  lcd.clear();
                  lcd.setCursor(0,1); //primul rand  
                  lcd.print(payload.C);  
                  trimitere();
                  if (digitalRead(buttonPinEsc)== HIGH){break; i=0;} 
                  digitalWrite(LedRosu, LOW);
                  digitalWrite(LedGalben, HIGH);
                  analogWrite(LedVerde, i);   
                 } 
      if (digitalRead(buttonPinEsc)== HIGH){break; i=0;}          
  }

what i do wrong ??????

Untitled3.bmp (2.07 MB)

if(digitalRead(buttonPinUp) == HIGH);

I stopped reading there.

yes that ....is not ok??

if(digitalRead(buttonPinUp) == HIGH);

sorry if i'm making a mistake

                   arduino 
                      |                                     
gnd-----------10k-----| ------ push button---------5V

arduino pin is LOW until i press the push button and goes HIGH
and the HIGH state i need to enter the loop ???

No, it is very not OK.
Lose the semicolon.

OHHHHHHHHHHH whaw ...... THAT
yesssss ..... simply genius... i had looked at the code over and over .....but that every time i did not noticed....

THANK YOU !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

arduino pin is LOW until i press the push button and goes HIGH
and the HIGH state i need to enter the loop ???

EDIT: oops - after seeing some sarcasm I accidently deleted my answer! -sorry.

AWOL - THAT WAS THE ANSWER !!!! it works ok !!!!
and dlloyd post againe !!!!

Did you lose the other one?
(I lied about stopping reading)

the other one ..... ???? problem ??
really there is no other problem ......... !!

or i'm tired and i do not see the problems ......
this is the 5'th time i read the code and nothing

if (digitalRead(buttonPinEsc)== HIGH){break; i=0;}

when i press the exit button ... it goes BREAK..... BUT NOT SET THE COUNTER TO 0 i=0;

What a surprise.

that's why when i have trouble ... after i googled alott .. i came here
when i read the examples ...over the internet i was looking at overall statement ... at how works, not at small things like ";"
and the i=0; it was added later, and my bad i did not see the problem,
and to be honest i saw it when i uploaded the sketch .... and i knew where to look

overall MY MISTAKE, sorry bothering you