Illegal character after directive

Your script contains a %If directive in which the keyword %Else or the block terminator %End If is followed on the same line by a space or Tab and then one or more characters other than the comment character ('). For example:

%If WIN16
%ElseIf WIN32
%End If  Win16.      ' Illegal
%End If              ' Win16. (This is legal.)

Insert the comment character if a comment is intended, or remove the superfluous characters.