|
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Sun Nov 12, 2006 9:39 pm
Maybe a bug? [1.15] |
I'm not sure if this is a bug or bad code, but here we go.
I have a trigger to capture my experience, the action of the trigger is.
#var exp %1
#math exp2 %1-@EXP
#MATH EXPTONEXTLVL {%db(@LVLEXP,@LVLNEXT)}-@EXP
#add expgain @exp2
I display in my status window my current exp, how much exp i've gained since the last time i've checked, how much exp until my next level, and grand total counter of exp i've gathered since i logged in.
the problem is the exp gain variable keeps showing that I just gained whatever my current exp is, and won't update. Also the exp gained from the last time i've checked always stays 0.
The here is how the trigger works in zmud (which faults even more in cmud):
#math exp2 %1-@exp
#var exp %1
#math ExpToNextLvl (%db( @LvlExp, %eval( @Lvl + 1)) - @exp)
#add expgain @exp2
So is this a bug? or just bad code? And if it's code, how can I clean it up? |
|
_________________ Yama |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 13, 2006 8:23 pm |
There is currently a bug in the %db function that is treating the result as a string. This should be fixed soon.
|
|
|
|
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Mon Nov 13, 2006 10:59 pm |
*nod* I won't spend too many hours thinking of an alternative then.
This version is light years ahead of the 1.00-1.01 releases, keep up the good progress. |
|
_________________ Yama |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 13, 2006 11:35 pm |
The current work-around is to put %int around the %db function:
#math ExpToNextLvl (%int(%db( @LvlExp, %eval( @Lvl + 1))) - @exp) |
|
|
|
Yamabushi Apprentice
Joined: 29 Jul 2003 Posts: 101 Location: USA
|
Posted: Tue Nov 14, 2006 2:17 pm |
If that's the same as changing the variable type from autotype to integer, that will work too.
|
|
_________________ Yama |
|
|
|
|
|