The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Mitsarugi on July 16, 2010, 11:08:25 AM

Title: [SOLVED] Scripting maths
Post by: Mitsarugi on July 16, 2010, 11:08:25 AM
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
Title: Re: [HELP] Scripting maths
Post by: 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%%" .
Title: Re: [HELP] Scripting maths
Post by: Mitsarugi on July 16, 2010, 10:38:47 PM
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 ^^