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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Thu Aug 21, 2008 11:36 am   

#LOOPDB dbvar {#var dbvar.%key {0}}
 
I decided that subject says it all.

I want to loop through the database var, changing all the values to zero.

I was using
#LOOPDB dbvar{#var dbvar.%i {0}}

up until 2.36 came out. I realise that its awful syntax (looking at it, it doesn't really look like it should even work) but at the time I wrote the script it was the only workaround I could come up with. Now, it works for every item except the FIRST one on the elixlist output, so I need to figure out the proper way to do this.

Is there some way of doing this with loopdb? I know I could set each value with an individual command, but there are other scripts I use this technique in that require it to happen dynamically.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Thu Aug 21, 2008 12:12 pm   
 
Code:
#LOOPDB @dbvar {
  #ADDKEY dbvar %key 0
}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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