|
Xosen Newbie
Joined: 25 Jan 2002 Posts: 6
|
Posted: Wed Jan 30, 2002 10:40 am
Adding variables |
HI!!
Can someone explain me how to add two variables??
I want to do something like this:
#TR {You kill a troll.} {#VAR killedtrolls (@killedtrolls + 1)}
But instead of adding the variable turns to something like this:
killedtrolls
((((1+1)+1)+1)+1)
Can someone help me? Thanks.
Xosen |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Jan 30, 2002 12:07 pm |
For your instance, you can use
#TR {You kill a troll.} {#ADD killedtrolls 1}
The other way would be to
#TR {You kill a troll.} {#VAR killedtrolls [@killedtrolls + 1]}
[] expand the number for you. Same with <>
Help files, search for expand "fill <@container>"
TonDiening
Uses 6.16 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jan 30, 2002 5:20 pm |
Use #MATH instead of #VAR. This should even add up your old kills if you haven't changed the variable.
#TR {You kill a troll.} {#MATH killedtrolls (@killedtrolls + 1)}
LightBulb
All scripts untested unless otherwise noted |
|
|
|
|
|