|
Crymson4 Novice
Joined: 20 Nov 2001 Posts: 35 Location: USA
|
Posted: Tue Nov 20, 2001 12:41 am
Multiple Instances of the same variable? |
I'm trying to keep my current gold amount stored in memory at all times.
The current trigger I have set up is
<%1G
to which the command is
#VAR CurGold %1
My problem is that instead of updating @CurGold with the new amount, it just creates another CurGold variable. Any ideas on why, or how to rectify it?
Thanks,
-Crymson |
|
|
|
decantor Apprentice
Joined: 14 Nov 2001 Posts: 100
|
Posted: Tue Nov 20, 2001 3:21 am |
#TRIGGER {<(%d)G} {#VAR CurGold %1}
I would also consider using a different character besides "<" to lead into the trigger, as zmud might parse it on you.
Whenever you are triggering off something, whether it is a number, word, letter or whatever and want to assign it to another part of the function, always use the umm.. 'lettered character'(%d for numbers,
%w for words, etc.), and then refer back to them in the command portion of the action with the 'numbered character' (%1, %2, etc.). This way zmud won't wig out on you nearly as much.
I'm also sorry that that sounds far more confusing than it actually is. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Nov 22, 2001 12:05 pm |
A perfect example for this problem is presented in the trigger patters page of the help. #TRIGGER {You have &%d{Gold}gp} Also on the same page you will see something about using the quote character to match special pattern characters. < qualifies as a special character generally and just to be safe should be prefaced with the quote character. So you want your trigger pattern to be: ~<&%d{CurGold}G
You may also want this pattern to detect only at the start or end of line. Just a few options for ya. |
|
|
|
|
|
|
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
|
|