|
cronus Newbie
Joined: 01 Feb 2003 Posts: 7 Location: USA
|
Posted: Thu Dec 11, 2003 1:06 am
xp trigger |
ok I've got an xp trigger working, but when I report it %format ("&10.0n",@exp) if the third digit is a 0 it dont show up, for example, is exp=11,011, it reports 11,11, the variable show's it right (11,011) and if exp=11,111 it reports 11,111 just fine. anyone got any suggestion's on this, not major, just annoying :)
cronie |
|
|
|
Toetag Magician
Joined: 10 Oct 2000 Posts: 356 Location: USA
|
Posted: Thu Dec 11, 2003 3:32 am |
not sure exactly how the %format works as I guessed and played around with it till it worked.
%format( "&1.0n", @exp2) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Dec 11, 2003 3:45 am |
If you want to use %format, take the commas out of your variable.
#VAR exp {11011}
#SHOW %format("&10.0n",@exp)
If you want to use commas in your variable, don't use %format.
#VAR exp {11,011}
#SHOW @exp
You only need to put commas in once, trying to do it both ways causes problems.
If you want to use commas in the variable, but also want to use %format to right-justify the display
#VAR exp {11,011}
#SHOW %format( "&10s", {@exp}) |
|
|
|
cronus Newbie
Joined: 01 Feb 2003 Posts: 7 Location: USA
|
Posted: Fri Dec 12, 2003 3:00 am |
I dont have comma's in the variable, it stripes them when it reads it from the mud so var exp=11011 but the %format ("&10.0n", @exp) reads 11,11 it drop's the zero's on me, I've tried %format ("@10.0n", {@exp}) and with @exp in both () and []. () it wont read it at all and the other two I get the same effect.
cronie |
|
|
|
cronus Newbie
Joined: 01 Feb 2003 Posts: 7 Location: USA
|
Posted: Fri Dec 12, 2003 10:05 pm |
I got it figured out I had an extra set of bracets in there. thanks for the help :)
|
|
|
|
|
|
|
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
|
|