Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
dime
Novice


Joined: 15 Dec 2002
Posts: 35

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: 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.
Reply with quote
dime
Novice


Joined: 15 Dec 2002
Posts: 35

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net