|
pfloyd Newbie
Joined: 09 Dec 2003 Posts: 4 Location: Canada
|
Posted: Sat Jan 10, 2004 4:03 am
XP Counter |
Here is an aliase I made to calculate xp/h..
#SAY XP gained : @exp Xp, Ratio: %eval(((@exp/@time)*60)/1000000),%eval(((( @exp/@time)*60)1000000)/10000) Mil xp/h.
Works fine excepts 2nd part of evaluate..
is answer is less then 10 itll display wrong..
Ex.
5.6 Mil xp/h. instead of 5.06 Mil xp/h.
any idea?
Luigi |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sat Jan 10, 2004 4:34 pm |
The modulus function you are using drops any preceding 0's of the remainder. I can't figure out any way to make sure it keeps the 0's, though.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 10, 2004 6:00 pm |
The easiest solution is to drop the decimal calculation.
Some other solutions:
Calculate tenths instead of hundredths.
Calculate tenths and hundredths separately.
Use %if to put a 0 in front of the hundredths when it is less than 10. |
|
|
|
|
|