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
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Mar 22, 2007 11:30 am   

[1.26] Accessing a Variable from a Module
 
Am I daft or just forgetting one of the earlier discussions.

I have a module Money with a variables Money and Carried. I'm trying access Carried from the Status Window and Command Line.

Package
|
|- Money (Module)
|---> Money (Variable)
|---> Carried (Variable)
|
|- MainWindow (Window)
|---> StatusLine (StatusLine Item)

Now based on this discussion I thought the syntax would be #SHOW @//Money/Carried but that doesn't seem to work, but I can't find any other reference on how to do that.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu Mar 22, 2007 11:34 am   
 
I think it's a bug, Tech. For packages other than the main session package, someone reported that they couldn't access a variable outside the module the script was run from, even when all their modules were global. I reproduced it when I tested.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Mar 22, 2007 11:42 am   
 
Never mind.. the syntax was right.. my session was just screwed. Now I'm having trouble defining the variable... but I think I just need sleep. I should have gone to bed hours ago and the alarm is set to go off in one hour.

Why oh why Zugg did you make CMUD so good?
_________________
Asati di tempari!
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