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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 30, 2007 10:25 pm   

[1.30] 'invalid local variable' in trigger pattern
 
#TRIGGER {^Test1$Test2$} {whatever}

(When trying to match a line following another)
Throws an error saying $Test2 isn't valid. There was another post Zugg commented on saying we should escape $, but that would affect the trigger pattern in this case
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Apr 30, 2007 10:49 pm   
 
Hmm, I write triggers in both regex and zscript as the need\whim arises.

A work around for this would be to use regex. In regex \n is the same as $ in zscript.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Apr 30, 2007 10:53 pm   
 
Or you can use conditions, or just edit the trigger in the settings editor after it's been created.
Just reporting it anyway ;)
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue May 01, 2007 12:27 am   
 
Doesn't putting a ~ in front of the first $ work?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue May 01, 2007 12:29 am   
 
But then it looks for the $ symbol, rather than an end of line. You can put ~$ to make CMUD create a trigger, but then you need to go into the editor and remove the ~
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue May 01, 2007 2:01 am   
 
Ahh, ok, I see what you mean. Yes, this is a bit weird. Putting a ~ before the $ *should* tell it to match a $ character verbatim, so that's working as it should. I'll add this to the bug list, but it probably won't get fixed for a few versions...I'll have to give more thought to how this should work.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue May 01, 2007 2:45 am   
 
Well, if it really comes to it, multistate triggers with the within=1 set will do the same job. I personally haven't used $ in the middle of a pattern for a long, long time.
_________________
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 Beta Forum 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