|
kurosh Beginner
Joined: 01 May 2002 Posts: 18
|
Posted: Sun Feb 16, 2003 7:18 am
Using decimals? |
Does zmud not support decimals? When I try to use some in math it just screws up. I've tried doing *.01 and *(1/100) both give me wrong results... What I'm trying to do is I get a message like this
"You receive 10% of the experience points needed to level."
So I'm trying take the number and divide it by 100 so I can multiply it by my TNL and figure out how much exp I gained. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Feb 16, 2003 12:04 pm |
Upgrade to 6.40
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Feb 17, 2003 6:36 am |
zMUD uses integers by default. It's possible to use decimals with %float or 0.01 (using the latest public version). However, that's not really needed for your intended use. Just do all the multiplication first (should work with almost any version).
#TR {You receive (%d)~% of the experience points needed to level} {#SAY You got about %eval( @TNL * %1 /100) experience.}
LightBulb
Advanced Member |
|
|
|
|
|