BWGames <de*****@bwgames.net> wrote in news:cu**************@tehlan.co.uk:
Ooops sorry!
The problem was a missing ) in the preceding IF statement.
Sorry all!
It's *very* important to realize that a parser can't detect the exact point
at which an error occurs. All it can do is detect the point where its
input stops making sense according to the language's grammar; this is
almost always going to occur quite a ways *after* the actual mistake.
For example, if you leave off the closing parenthesis on an if condition,
the parser will try to read the next statement as if it was still part of
the if condition. It won't be able to detect an error until it runs across
something that can't legally occur inside an if condition, and that may be
well into the next statement, or even the statement after it.