your brackets around your if statements are wrong, if the actions you want to perform upon an if statement resolving to true take up more than one line you need to open a curly bracket, do your stuff, then close a curly bracket.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// this will do the first thing if the condition is true, and always do the second and third thing
if ( whatever condition is true )
do first thing;
do second thing;
do third thing;
// this will do both the first and second thing if the condition is true and neither if it is false, then always do the third thing
if ( whatever condition is true )
{
do first thing;
do second thing;
}
do third thing;