An unknown error occurred.

Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@".