|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 22, 2006 8:31 pm
[1.11] %format with the d option. |
Admitted I might be using it wrong, the the d (decimal) option %format doesn't seem to be working.
Code: |
#VAR XP 256740
#show XP: @XP XP: %format("&8.0d", @XP) XP: %format("&8.0n", @XP) |
outputs
Code: |
XP: 256740 XP: XP: 256,740 |
[Edit:]
I must be using it wrong because it doesn't work in zMUD 7.21 either. I basically want to the number to be displayed fixed width, right justified without the commas of the 'n'. The workaround I'm using is to use
XP: %format("&8.0f", @XP) instead. |
|
_________________ Asati di tempari! |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 22, 2006 8:42 pm |
As an aside, the left justify option (i.e. XP: %format("&-8.0d", @XP) doesn't seem to maintain the padding in CMUD.
|
|
_________________ Asati di tempari! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Oct 22, 2006 9:05 pm |
hmm, worked for me in ZMud. Try using % instead of &? Noticed it wasn't working in CMud, though, and I believe I reported it already.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 22, 2006 10:58 pm |
% didn't work for me either.
|
|
_________________ Asati di tempari! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Oct 23, 2006 1:59 am |
Yeah, I worded my response wrong. Meant to say it completely doesn't work in CMud, but that % might work in ZMud where & wasn't.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|