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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Sun Jun 08, 2008 7:15 pm   

stringlist q
 
how is it that i could remove a value? for example...

Code:
#var {mob_list} {one=10|two=10}
#trg {one goes} {<this is where i want to subtract a key from the db var>}
#trig {two goes} {<this is where i want to subtract a key from the db var>}


basically, when i get a 'one goes' it will subtract a value from the db mob_list and they key=one. tia!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jun 08, 2008 8:07 pm   
 
#trig {one goes} {#ADDKEY mob_list {one} {(%db(@mob_list,"one")-1)}}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jun 08, 2008 9:28 pm   
 
You could also use #add mob_list.one -1.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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