This is my code to use a button:
int estado = 0
void setup(){
pinMode(8, INPUT);
pinMode(4, OUTPUT)
}
void loop(){
estado = digitalRead(8);
if(estado == HIGH){
digitalWrite(4, HIGH);
}
else {
digitalWrite(4, LOW);
}
}
Your eyes have failed you. Your first line is missing a terminating semicolon.