Author Topic: help please ! decimal places  (Read 1459 times)

0 Members and 1 Guest are viewing this topic.

Offline Nemesis

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
help please ! decimal places
« 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
We all have a photographic memory.. just some of us forget to put the film in...  

PtokaX forum

help please ! decimal places
« on: 19 May, 2004, 13:11:29 »

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #1 on: 19 May, 2004, 14:36:10 »
here's a hint.
Result_with_2_decimals = format("%0.2f", Number_with_decimals)

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline Corayzon

  • Lord
  • ***
  • Posts: 464
  • Karma: +1/-0
(No subject)
« Reply #2 on: 22 May, 2004, 11:50:03 »
you allways packed full of such good info plop =]

polp the plop

PtokaX forum

(No subject)
« Reply #2 on: 22 May, 2004, 11:50:03 »