syntax error : !ENDIF unexpected
An !ENDIF directive was found that was not preceded by an !IF directive, or the directive was placed in a syntactically incorrect place.
The !IF preprocessing directives include !IF, !IFDEF, !IFNDEF, !ELSE IF, !ELSE IFDEF, and !ELSE IFNDEF.