{HELP} Elevator with 3 floors and buttons

I have this code but the buttons does not work properly with the stepper motor, can anyone help me?

#include <Stepper.h> // incluye libreria stepper

Stepper motor1(2048, 8, 10, 9, 11); // pasos completos
int ActualFloor=1; //definimos la planta actual donde comienza el ascensor
int floor1=1;
int floor2=2;
int floor3=3;
int value1=0;
int value2=0;
int value3=0;
int pasos=0;
void setup() {
motor1.setSpeed(3); // en RPM (valores de 1, 2 o 3 para 28BYJ-48)
pinMode(floor1, INPUT);
pinMode(floor2, INPUT);
pinMode(floor3, INPUT);
Serial.begin(9600); // incializacion de comunicacion serie a 9600 bps

}

void loop() {
value1 = digitalRead(floor1); //lectura digital de pin
value2 = digitalRead(floor2); //lectura digital de pin
value3 = digitalRead(floor3);

if (plantaActual==1){

if (value2==HIGH){ //lectura digital de pin
motor1.step(-512);
delay(2000);
ActualFloor=2;
}

if (value3==HIGH){
motor1.step(-1024);
delay(2000);
ActualFloor=3;
}

else
{
motor1.step(0);
delay(2000);
ActualFloor=1;
}
}

}

While you are waiting for the buttons to be pushed, do not use delay(). Read the buttons as fast as you can.

MorganS:
While you are waiting for the buttons to be pushed, do not use delay(). Read the buttons as fast as you can.

so, the code is correct like that?

Your code does not compile because plantaActual has not been declared

Likely supposed to be ActualFloor - partially completed translation effort?

the buttons does not work properly with the stepper motor

Can you be more specific?

so, the code is correct like that?

No. Pay some attention to which pins you can, and which pins you can NOT, use, when using Serial.