![](templates/Classic/images/spacer.gif) |
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Sun Apr 24, 2005 1:49 pm
Parsing large numbers in alias'd script output |
Hi all, I'm looking for a way to parse large numbers (1,000+) in script output. For eample, if I have an alias to show total gold spent on potions, and the output is:
I have spent 1123456 gold on potions.
I'd want it to output:
I have spent 1,123,456 gold on potions.
I assume it's some simple % command I am missing to format the variable containing the number... But I cannot find it in the helps. Thanks in advance![/code] |
|
|
![](templates/Classic/images/spacer.gif) |
megamog75 Enchanter
![](images/avatars/36480385240f965059f0c4.jpg)
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Sun Apr 24, 2005 2:20 pm |
check out %format in the help files it has a detailed explination for you
this will work up till 99,999,999,999
%format("&10.0n",123456)
I use %format("&3.0n",123456) |
|
_________________ megamog75
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere |
|
|
![](templates/Classic/images/spacer.gif) |
nexela Wizard
![](images/avatars/3549517644153b10a6a2fb.jpg)
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Apr 24, 2005 2:24 pm |
#SAY %format("&0.0n",@varWithNum)
This basicly just tells it not to pad and not to show decimal places |
|
|
![](templates/Classic/images/spacer.gif) |
|
|
|
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
|
|