Search code examples
autoit

AutoIt: Illegal text at end of statement


I'm unable to figure out what it wrong with this

Func Hypotenuse($a, $b)
    Return sqrt($a * $a + $b * $b)
EndFunc

Error is

Func Hypotenuse($a, $b)
Func Hypotenuse($a, $b)^ERROR

Error: Illegal text at end of statement (one statement per line).

EDIT: It appears to have been a hidden character


Solution

  • You copied code from AutoIt forum or some other Invision Power Board driven forum.

    If that is correct, you copy the end-of-line HTML-character if you don't pop out the code box. Easiest fix for many lines is to CTRL + A, copy & paste into Notepad, then copy that and paste back into SciTE.