Syntax error on if condition