Unterminated %IF, %ELSEIF, or %ELSE directive

Your script contains a %If directive to which there is no corresponding %End If. For example:

%If WIN16
%ElseIf WIN32
' End of script. Error message appears here because there is no %End If.

Insert a %End If in the appropriate place in the script.