An IF | ELSE | ENDIF statement is missing (Error 1211)

See the IF ... ENDIF topic for details on executing commands conditionally.