|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: 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? |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Aug 14, 2004 8:30 pm |
Never mind, I just decided to trigger the Cyrene Savings Bank(%s):(%s)(%d) instead.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
|
|
|