Can't use digital.Write in void correctly. ''digital was not declared''

This is my code, below is pointed where is the problem

And this is the error message

thanks for the help : )

exit status 1
'digital' was not declared in this scope

#include <Servo.h>

Servo servo1; //denominamos la variable servo1 como un servo
int PINSERVO = 2; //el pin para controlar el servo esta en el pin 2
int PULSOMIN = 500; //valores maximo y minimo en microsegundos para la rotacion 90 a la derecha y 90 a la izquierda del servo.
int PULSOMAX = 2500;

int MODERECHA = 9; //el pin de orden de giro a la derecha esta en el pin 9
int MOIZQUIERDA = 8; //el pin de orden de giro a la izquierda esta en el pin 8

int ESPERA = 10; //el pin que nos muestra una led cuando se esta ejecutando un comando y hay que esperar a que finalize

void AVISOREINICIO(int ESPERA);

void setup() {
// put your setup code here, to run once:

servo1.attach(PINSERVO,PULSOMIN,PULSOMAX); //asociar los valores de pulsomin y pulsomax a el servo 1 ademas del puerto en el que esta localizado.
servo1.write(90); //pone la posicion del servo 1 en el grado 90 pudiendo luego ir 0 o 180.
delay(2000);

}

void loop() {
// put your main code here, to run repeatedly:

if(digital.read(MODERECHA) == HIGH){
servo1.write(0);
digital.write(ESPERA, HIGH);
delay(2000);
digital.write(ESPERA, LOW);
}
else{
if(digital.read(MOIZQUIERDA) == HIGH){
servo1.write(180);
digital.write(ESPERA, HIGH);
delay(2000);
digital.write(ESPERA, LOW);
}
}

AVISOREINICIO(ESPERA);

}

void AVISOREINICIO(int ESPERA){

for(int contador = 0;contador<=2;contador++){
digital.write(ESPERA, HIGH); <--- HERE IS THE PROBLEM
delay(400);
digital.write(ESPERA, LOW); <--- ALSO HERE
delay(400);
}
}

Use the functions digitalWrite() and digitalRead() instead.

Please use code tags when posting code.

Problems here too

Read the forum guidelines to see how to properly post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

@andsnow1, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project.

Please edit your post, select all code and click the </> button to apply code tags. Next save your post.

As mentioned, the function is digitalWrite, not digital dot Write; same for reading a pin (digitalRead()).

You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps

  1. press Ctrl-T for autoformatting your code
  2. do a rightclick with the mouse and choose "copy for forum"
  3. paste clipboard into write-window of a posting

best regards Stefan