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


Joined: 29 Mar 2003
Posts: 7

PostPosted: Fri Feb 06, 2004 10:55 pm   

Aliases and Variables
 
I am trying to use an alias to add an item to a stringlist, so I am using #ADDITEM Var %1

But the problem is that my variable is not in the root directory and i don't want it there, so how would i manage to do it?

ADDED:

Is it possible to create an alias in a different class? how do i use it?

MORE ADDED: :p

Ok, I switched to what I was doing before and it works now. (it wasn't working because the class was disabled, any way to do it when class is disabled?)

I was doing this:
#VAR Var {%additem( %1, @Var)} {_nodef} {ClassName}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Feb 08, 2004 6:30 pm   
 
1. Create the variable in the class where you want it. #ADDITEM will look for existing variables before creating a new one.

2. You create an alias in a different class by supplying the classname in the class field of the #ALIAS command or by selecting the desired class in the settings editor before clicking the New button. You use such an alias the same way you use any other alias.

3. No, if the class is disabled the settings in it won't be seen. However, it is possible to enable the class before issuing the #ADDITEM or #VARIABLE command and disable it afterward.
#IF %class( ClassName) {#ADDI Var %1} {#T+ ClassName;#ADDI Var %1;#T- ClassName}
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