PtokaX forum

Development Section => Your Developing Problems => Topic started by: Nemesis on 19 May, 2004, 13:11:29

Title: help please ! decimal places
Post by: Nemesis on 19 May, 2004, 13:11:29
Trying to get a users share and show it in main when they connect which does works fine....

    user:SendData(Bot,"      Your Sharesize is :"..getMyInfoString(user).share/1024/1024/1024)

The prob is that im not sure on how to take the share down to 2 decimal places..    ie: 21.75gb shows at 21.7490275753662 any info or advice welcome TIA    8)

New to scripts so please be patient.. thnx  8o
Title:
Post by: plop on 19 May, 2004, 14:36:10
here's a hint.
Result_with_2_decimals = format("%0.2f", Number_with_decimals)

plop
Title:
Post by: Corayzon on 22 May, 2004, 11:50:03
you allways packed full of such good info plop =]

polp the plop