I see you say that often but I've never had that problem. Auto Format works fine for me on Windows with every IDE version I can remember using no matter how mismatched the braces are. Maybe it's an OS-specific thing? I can't imagine why that would matter
Here's mannan12's code after I did an Auto Format on it:
int LEDS = 5;
int buttonA = 9;
int buttonB = 8;
byte leds = 0;
void setup()
{
pinMode(LEDS, OUTPUT);
pinMode(buttonA, INPUT_PULLUP);
pinMode(buttonB, INPUT_PULLUP);
Serial.begin(6900);
}
void loop()
{
if (digitalRead(buttonA) == LOW)
{
digitalWrite(LEDS, HIGH);
}
if (digitalRead(buttonB) == LOW)
{
digitalWrite(LEDS, LOW);
}
else
digitalWrite(LEDS, HIGH);
delay(500);
digitalWrite(LEDS, LOW);
delay(500);
}
}
As you can see, the cause of the error is now much more obvious.