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
saea
Newbie


Joined: 25 Sep 2004
Posts: 4

PostPosted: Wed Feb 02, 2005 1:36 am   

Database Formating
 
I have a database that has equipment in it, and I want to be able to show a list of the name of each piece (in a certain view) that is formatted using %format. However, I can't seem to find a way to loop through the database and have it display as anything other than:

talisman
torc
cloak

Which is how #LOOPVIEW shows it. I want it to be something like...

talisman torc cloak

Anyone have any ideas?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 02, 2005 5:57 pm   
 
Code:
#VAR lv 0
#LOOPVIEW {#ADD lv 1;#IF (@lv > 2) {#VAR lv 0;#SHOW &Name} {#SHOWP &Name}}

You'll need to set @lv to 0 either before or after the loop, so that it always starts the same.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
saea
Newbie


Joined: 25 Sep 2004
Posts: 4

PostPosted: Thu Feb 03, 2005 4:13 pm   
 
Thanks for the help. That did work, though I still can't quite format it the way I'd like to. I've discovered working with database variables is easier than with the databases themselves, so I've switched over to that.
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