NEED HELP if and else variables not working???

int (switchState = 0); void setup() { pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(2, INPUT); }

void loop() { switchState = digitalRead(2); if (switchState == LOW) ; digitalWrite(3, HIGH); digitalWrite(4, LOW); digitalWrite(5, LOW); } { else( digitalWrite(3, LOW); digitalWrite(4, LOW); digitalWrite(5, HIGH); delay (250); digitalWrite(4, HIGH); digitalWrite(5, LOW); delay(250)) }

If statements dont get semicolons. When you put that there it terminates the conditional block and basically translates to "if this then do nothing."

Maybe the variables are working perfectly, but your button switch is not working?

Did you work through the Arduino button tutorial?

https://www.arduino.cc/en/Tutorial/Button

Do you know why a pushbutton circuit needs a pull-down or pull-up resistor or otherwise will not work?