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
Dark Dante
Newbie


Joined: 03 May 2001
Posts: 4

PostPosted: Mon Jul 10, 2006 9:15 pm   

Deleting unknown variables
 
I won't bore anyone with the actual code unless requested. I have a trigger set up to capture information about group members, and to create a variable for each person. The thing is, I also want an easy way to delete all of the variables, which is hard because obviously, I won't know what the names are. First, I added each variable name to a string list, and tried to call it with this:

#UNVAR %item(some_variable,1)

Which didn't work, and even if it did, I would also have to create a loop or for statement using the number of items. I wanted to try appending a prefix to each variable, like:

#VAR MM%1 somedata

But I couldn't figure out how to use wildcards to access variables.

I'm a c programmer, so I'm really looking for some kind of pointer thingie. I'm using 5.55, so if upgrading would help, I'd be willing to do that. Thanks.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jul 11, 2006 12:00 am   
 
Put all the variable in a class and then just use #DELCLASS
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jul 11, 2006 3:41 am   
 
I'd personnal use a %db variable then you can either set it to %null or #DELKEY things. Key an index key so you know what is in it.
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