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
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Mon Nov 04, 2002 3:45 am   

%format
 
Is there a way to use a variable in the &s part of the format string?

#SHOW %format("&s &s &s",%item(@MagicPotionList,@Counter),"-","Description Info") works as expected - but nothing special. With different values for @Counter the %item returned is different and usually of a different length. I'm trying to set up a table of sorts so was hoping that this
#SHOW %format("&s &(20-%len(%item(@MagicPotionList,@Counter)))s &s",%item(@MagicPotionList,@Counter),"-","Description Info") would allow me to have the '-'s all lined up nicely. Alas, not. And nor does just putting in a @Variable.

Any ideas?

Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 04, 2002 6:27 am   
 
If you just want things lined up use the number with the first &s.
%format("&20s &s &s", %item(@MagicPotionList, @Counter), "-", "Description Info")

LightBulb
Senior Member
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Mon Nov 04, 2002 1:23 pm   
 
Yeah, that was my bail out option, but I wanted to pad the end of it not the front of it. That's why I did it on the '-'.



Stay JOLLY!
H

___
Humpton lives like he types.... fast, and full of mistakes!

Core 2651: For those who prefer the future to the past.
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