|
TheQ Newbie
Joined: 08 Aug 2008 Posts: 1
|
Posted: Sat Aug 09, 2008 12:08 am
Please help with formatting numbers |
i'm trying to take this
Experience: 2507096
and turn it into this
Experience: 2,507,096
I simply want the comma's in the correct place. Easy to do ?
Thanks for any help offered. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Aug 09, 2008 4:38 am |
You're looking for the %format function. For example
Code: |
#SHOW %format("&.0n", 2507096 ) |
should do what you want. |
|
_________________ Asati di tempari! |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Fri Aug 15, 2008 12:28 am |
Or, if you're looking to do it via a trigger or a #SUB you can use:
#TRIGGER {Experience: (%n)} {#SHOW %format("&.0n", %1)}
Or the same with a #SUB. |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
Rappy Wanderer
Joined: 15 Jul 2005 Posts: 96
|
Posted: Thu Sep 04, 2008 8:39 pm |
I use #PSUB for that
Code: |
#TRIGGER {Experience: (%n)} {
#PSUB {%format("&0.0n",%1)} %x1
}
|
-Rappy |
|
_________________ Windows 11 Pro,
cMUD 3.34 |
|
|
|
|
|