The problem is that the if statement ends at the ; The code following the ; is not part of the if statement.