Illegal Directive

Any of the following could have caused this error:

  • You used an unrecognized directive. For example:
    %Else If   ' Illegal
    %ElseIf    ' Legal
  • You nested a %Rem...%End Rem block inside another %Rem...%End Rem block.
  • You used an %End Rem without a preceding %Rem.
  • You used a %Else, %ElseIf, or %End If directive outside a %If...%End If block.
  • You nested a %If...%End If block inside another %If...%End If block.