Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Aldur
Beginner


Joined: 16 Sep 2003
Posts: 16
Location: Sweden

PostPosted: Thu Apr 01, 2004 8:30 pm   

Split large numbers.
 
The mud I play uses very large numbers for experience and gold etc.

Needed experience for companion: 58,994,882

for example.

To remove the "," is easy, just %replace("%1",",")

but is there a way to after processing the number with various mathematical functions split it up again so it for example shows 2,957,646 instead of 2957646?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Apr 01, 2004 11:01 pm   
 
The easiest way is to use the format function.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net