Main Menu
  • Welcome to The RPG Maker Resource Kit.

[SOLVED] Scripting maths

Started by Mitsarugi, July 16, 2010, 11:08:25 AM

0 Members and 1 Guest are viewing this topic.

Mitsarugi

i've got this in yanfly's display aftermath script and it shows the experience percentage , now it is showing 0.00000
VA_PERCENT_EXP  = "%#.05g%%"

what i want is : 0.00 or 100.00 (for if it's a 100 percent)

could any one help me with this? i suck at scripting maths o_O

cozziekuns

Do you want it to be 2 decimal places all the time or only when it's at 100 percent?

If you want it to be 2 decimal places all of the time, just use VA_PERCENT_EXP  = "%#0.2f%%" .

Mitsarugi

Quote from: cozziekuns on July 16, 2010, 05:38:45 PM
Do you want it to be 2 decimal places all the time or only when it's at 100 percent?

If you want it to be 2 decimal places all of the time, just use VA_PERCENT_EXP  = "%#0.2f%%" .
Thanks cozziekuns  it works ^^