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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Rivalyn
Beginner


Joined: 08 Oct 2002
Posts: 20
Location: USA

PostPosted: Tue Oct 10, 2006 10:31 pm   

[1.09] Variable declaration in packages listing under main
 
When I create a trigger or alias that declares the value of a variable, ie

alias t
tar=%1

or
trigger stance %1 as you flow
stance=%1

Although I create the trigger or alias in the child package (RivCombat), if I don't declare the variable within the child package, it automatically declares in the main package (in this case Imperian) upon first use. For instance, when I first ran a string that triggered the stance recording. The "stance" variable declared itself in the main package and would not interact with a child package alias that was calling on its value to determine an evaluation of an action.
Reply with quote
Rivalyn
Beginner


Joined: 08 Oct 2002
Posts: 20
Location: USA

PostPosted: Wed Oct 11, 2006 8:29 pm   
 
Do I need to clarify the situation, or is everyone just reading this and thinking I'm stupid because it's already been covered. Either way, I'd love to know. Razz
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Oct 11, 2006 10:31 pm   
 
This is actually the way it is supposed to work. When you create a separate package, the scripts in the package might be used within multiple other session packages for multiple characters. And normally you would want the variables to be separate for each other character window.

If you want to force the variable to be created in the current class, try using the ./varname syntax, or use the #NEWVAR command to create the variable initially. In other words, use:

./stance=%1

and it will create the variable in the current folder instead of in the main package.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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