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
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sat Aug 14, 2004 8:25 pm   

More Trigger Help
 
Here is my sample text:

You have accounts at the following banks:
the Cyrene Savings Bank : 24600

Total : 24600

I tried to use this trigger, but accounttotal isn't getting a value.

#TR {You have accounts at the following banks:} {#COND {the Cyrene Savings Bank(%s):(%s)(%d)} {#ADD accounttotal %3}}

Many spaces between 'the Cyrene Savings Bank', the colon, and the number.

Can someone point out what is wrong with this?
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sat Aug 14, 2004 8:30 pm   
 
Never mind, I just decided to trigger the Cyrene Savings Bank(%s):(%s)(%d) instead.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Aug 17, 2004 2:05 am   
 
Quote:

Can someone point out what is wrong with this?

You had the #CONDITION on the same line as the #TRIGGER, making it the value of the trigger instead of a second state.
#TR {You have accounts at the following banks:} {}
#COND {the Cyrene Savings Bank(%s):(%s)(%d)} {#ADD accounttotal %3}

The multiline trigger doesn't seem necessary, just use the first pattern to clear the variable before taking a new total.

#TR {You have accounts at the following banks:} {#VAR accounttotal 0}
#TR {the Cyrene Savings Bank(%s):(%s)(%d)} {#ADD accounttotal %3}
_________________
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
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