|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: Thu Jun 12, 2003 5:32 pm
double digits |
#TRIGGER {^Your base abilities are: Str:(%d) Int:(%d) Wil:(%d) Dex:(%d) Con:(%d).$} {#write 1 {%1 %2 %3 %4 %5 %eval( %1+%2+%3+%4+%5)}}
I would like to make it write numbers %1 - %5 as 2 digits.. even if they're 1...
ex: 12 9 8 7 19 would write as 12 09 08 07 19 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 12, 2003 7:12 pm |
#TRIGGER {^Your base abilities are: Str:(%d) Int:(%d) Wil:(%d) Dex:(%d) Con:(%d).$} {#write 1 {%if( %1 < 10, "0"%1, %1) %2 %3 %4 %5 %eval( %1+%2+%3+%4+%5)}}
I did one, I'm sure you can do the others yourself.
LightBulb
Advanced Member |
|
|
|
Darker GURU
Joined: 24 Sep 2000 Posts: 1237 Location: USA
|
Posted: Thu Jun 12, 2003 7:12 pm |
Instead of %1 (in your #Write statement), try %right("00"%1,2)
zMUD 6 Online Help: All the power you'll ever need. |
|
|
|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: Thu Jun 12, 2003 11:08 pm |
perhaps it's because i'm using zmud 6.16?
#show %right("00"19,2) outputs 19
#show %right("00"9,2) outputs 9
009 from 2 spaces is still just 9
the command i was looking for would be %rightback?
#show %rightback("0"9,2) shows 09
#show %rightback("0"19,2) shows 19
thanks for all the help |
|
|
|
|
|