Else If code

Hi
I have just started using the ardurino and just started to learn code.
I know how the If, Else code works but i am always getting the error Unqualified-id before if
This is my code (yes it is pretty simple)

void setup() {

}
void loop() {
}
if(input1 == LOW && input2 == LOW){
analogWrite(1, 120);
analogWrite(5, 120);
analogWrite(9, 90);
}
else
analogWrite(1, 120);
analogWrite(5, 120);
analogWrite(9, 90);

}

}
}

You have an extra } in the line after void loop() {, get rid of that.
Your { } after the else if are not paired up correctly.

If you press CTRL-T, the IDE can format the code for easier viewing and will tell about ( ) and { } mismatches.

himynameis:
void loop() {
}
if(input1 == LOW && input2 == LOW){
analogWrite(1, 120);
analogWrite(5, 120);
analogWrite(9, 90);
}
else
analogWrite(1, 120);
analogWrite(5, 120);
analogWrite(9, 90);

}

}
}

What are the curly braces after "void loop" doing? Your loop is empty and the following "if" is not part of anything.

Paul