Formating decimals in PtokaX 0.3.3.0 build 17.02
 

Formating decimals in PtokaX 0.3.3.0 build 17.02

Started by BossiDeLeon, 31 May, 2005, 03:05:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BossiDeLeon

hey again,

i need to be able to output numbers in a certain decimal format, like say just 2 decimal places. how can this be done with PtokaX 0.3.3.0 build 17.02?

thanks!

jiten

Well, if you want two decimal places, try this one:
string.format("%0.2f",(x/y))
Where "2" means how many decimal places and "x" and "y" are the values.

Cheers

BossiDeLeon

works like a charm!

thanks jiten!

jiten

You're welcome m8.

SMF spam blocked by CleanTalk