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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Mon Oct 11, 2004 3:30 am   

temp trigger parsing question
 
inside an alias i create a temp trigger that is supposed to look at the next line of text, and perform an option with it...but it seems to be parsing wierd and i cant fix it...any help would be appreciated.

#ALIAS where {#IF {"%1"="more"} {more} {#IF ("%1"="") {#ECHO WHERE FAILED};honors "%1";#TEMP {^(*).$} {where_name="~%1"}}}


Ex: where gilbert
this will create a new trigger that should be like:
#TEMP {^(*).$} {where_name="%1"}
but instead it creates:
#TEMP {^(*).$} {where_name="~"}
any help would be appreciated
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Mon Oct 11, 2004 5:56 am   
 
When you create the temporary trigger don't use ~%1 use %%1
That should do it

Cheers
_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Oct 11, 2004 3:12 pm   
 
It appears that you want to get %1 from the #TEMP trigger, but #ALIAS and #IF also use %1-%99 so I don't think your alias will work the way you intended. As it's written now,
'where more' will send 'more',
'where' will echo WHERE FAILED but send 'honors' and create a #TEMP trigger anyway
'where gilbert' will send 'honors gilbert' and create a #TEMP trigger
'where gilbert mueller' will also send 'honors gilbert' and create a #TEMP trigger
The #TEMP triggers will always set @where_name to "".

I suspect this is closer to what you actually intended:
#AL where {#VAR where_name "";#TEMP {(*).} {#IF ("%%1" = more) {more} {#IF ("%%1" = "") {#ECHO WHERE FAILED} {where_name = %%1}}};honors %1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Tue Oct 12, 2004 3:58 am   
 
i only had an outline of what i was coding...the thing im debuggin is the part i mentioned...
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Tue Oct 12, 2004 3:59 am   
 
thanks lightbulb for the suggestions though
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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