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
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Feb 15, 2007 4:52 pm   

Duplicating variables or class?
 
I have a class which contains around 720 variables (these are each a data record with 3 values)

I would like to copy all of these into another class and leave the originals to reset to blank (use default) on boot up

eg
A Class
@test 1

copied to
B Class
@test 1 (or even better a new name?)

A Class
@test 1 (resets to default when next booted)
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Feb 15, 2007 5:17 pm   
 
I'm not sure what you're asking here. The copying is as easy as selecting them and pressing Ctrl+C and Ctrl+V.

The default is a bit harder - to define a variable with a blank default you use

#var name value ""

And it's then as simple as getting a list of your variables and doing a #forall. Am I missing something here?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Feb 15, 2007 5:42 pm   
 
Sorry my bad I didnt explain what i want to do ok

I want to use an alias lets say

Alias1

I then need to copy a class (containing the 700+ variables)
eg
Class1 (is copied to)
Class2

then if i have set the class 1 variables to default and use default on bootup then

each bootup my variables will be reset and class 2 will contain the info from last time I used alias 1

think thats clearer if not ill try and explain it better
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