 |
Sir1l Wanderer
Joined: 01 Oct 2005 Posts: 54
|
Posted: Sat Jun 14, 2008 3:32 pm
Compiling |
Is there a way to see which line or wheere the illegal token, or whatever the failure in compiling is? Says illegal token and the * shows up red...guess that's it, but still can't find out if it's fure sure :(
|
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jun 14, 2008 3:48 pm |
If it says there's an error, there's always an error. Trouble is that where CMUD decides there's an error and where you made the mistake aren't always the same thing. For example, "illegal token" is a bit of a catchall error and often results if your spacing or {} characters are messing something up. But just because you forgot to open a { at a certain point doesn't mean that the script's necessarily invalid there. Sometimes CMUD might not realise until the end of the script, when you're closing your last few braces and it realises they're not all closed.
If you press Ctrl+K, you'll be shown the line and character number where CMUD detected the error and the cursor will be moved to that point. That's usually a good place to start. |
|
|
|
 |
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jun 14, 2008 5:59 pm |
When you click on Editor|Check Syntax, and there is an error, the cursor will be placed at the start of the error. If you look at the bottom right corner of the Editor screen, you will see that the coordinates for the cursor match the error coordinates. If you have code blocks (code that is enclosed in brackets), check to make sure you have a closing bracket. This is easy enough to miss if you have embedded blocks.
EDIT: oops, that's what Fang said!  |
|
_________________ Sic itur ad astra. |
|
|
 |
|
|
|