Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)

Last edited by Fang Xianfu on Sat Jan 19, 2008 5:07 am; edited 1 time in total
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net