 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jan 19, 2008 4:16 am
Compatability Report Improvement |
To catch errors of this kind, perhaps a regex could be added to the package library like ^[\@\%]. That should catch lines that start with something they're not supposed to.
|
|
|
 |
charneus Wizard

Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Jan 19, 2008 5:03 am |
Heh. Link doesn't work, but I know what you're talking about. You're referring to the instance of:
#FORALL @something {%i}
Instead of:
#FORALL @something {#EXEC %i}
And I agree. That'd be a nice improvement. I know several of my scripts from zMUD start with a function, and I just don't have the time to search through them all to see where they're at. *sigh*
Charneus |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jan 19, 2008 5:09 am |
Thanks, I couldn't remember if it was startlines or startcommands. Fixed it now.
Of course, the regex I've given wouldn't catch your example and it's difficult for a regex to know when a parameter is a command and when it's a value (for example, {%i} is a perfectly valid parameter to the #say or #var commands). But it'll catch simpler instances and, if you add \s+ to the start, instances when it's used as part of a multi-line syntax. |
|
|
 |
|
|