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
drifter
Newbie


Joined: 10 Oct 2005
Posts: 2

PostPosted: Mon Oct 10, 2005 2:55 pm   

having trouble with #if
 
I can't seem to get this to work:

The trigger text is: ^%1 has been marched.

The reaction is supposed to be:

#if %1=@member1 {toff}
#if %1=@member2 {toff}
#if %1=@member3 {toff}
#if %1=@member4 {toff}
#if %1=@member5 {toff}
#if %1=@member6 {toff}
#if %1=@member7 {toff}
#if %1=@member8 {toff}

toff is an alias for:

#T- grouptank
#T- Rescue
#T+ Shihonage
@poke = OFF
@rescue = OFF
@shihonage = ON


I'm guessing that the problem is in the #if statement, but I can't see it. any replies would be appreciated.

Thanks
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Oct 10, 2005 5:00 pm   
 
I think the problem is in your trigger. You said your trigger is
Code:
^%1


which will only match the literal "%1".

I'm assuming you want to match a word at the the beginning of a line so try this.
Code:
^(%w)


If this not right, then please post your exact trigger. Also a matter of efficiency, if you run the same command for each member you can try the command
Code:
#if %ismember(%1,@MemberList) { toff }

where @MemberList is a list of all the members; to reduce the number of #if statements used..
_________________
Asati di tempari!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Oct 10, 2005 10:03 pm   
 
2 Problems first you should be using (%w) or in the case where it could be more then 1 word (*) in place of the %1 in the pattern

Second the #IF should have proper quotes in it
#IF ("%1"=@member1) {toff}
_________________
Zmud Support Library
Zmud Knowledge Base
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