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


Joined: 25 Feb 2004
Posts: 98

PostPosted: Mon Jan 17, 2011 5:15 pm   

How to share variables with different sessions
 
I have created multiple sessions that share the same package, but they do not seemingly share the variable changes that I make in each session. Is that normal? Is there a way to make it share variable changes between sessions?

Thanks!

Robert
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jan 17, 2011 8:02 pm   
 
Yes. Move the variable into the shared package, and delete the duplicate variables within each session.

Normally, I believe that a script will search for variables first within the session package, and then in the package containing the script, and then in any other packages which the script can see. If it does not find any variable with the right name, it will create it by default in the session package.
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Mon Jan 17, 2011 8:25 pm   
 
Ah, I got it now. Got a much nicer setup for my multiple characters with some settings shared and others not. :) Thanks for the help!
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