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
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Oct 21, 2002 2:24 am   

How /Is it possible, to pass vars between windows?
 
I'd like to set the values for several variables in my main window by hitting buttons in a secondary window. I read the help files many times, and I can get the secondary window to send to the mud, but not to the primary window. I'd think something like this should work, but I've been unsuccessful...

Abc: @var = 3

What am I doing wrong? Or is this simply not possible? I'd rather not use global vars if I don't have to.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Oct 21, 2002 2:33 am   
 
You don't need the space in front, nor the @ character when referencing variables in the a = b syntax.

You might want to check your window preferences to see if Allow A=B syntax is checked, but I believe it's set that way by default.

li'l shmoe of Dragon's Gate MUD
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Oct 21, 2002 2:40 am   
 
Thanks for the quick reply!

How about this?

Abc:mainvar=<tempvar>

Is thist possible? Where mainvar is native to the main window, and tempvar is native to the secondary window?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Mon Oct 21, 2002 3:37 am   
 
Expansion is actually preformed prior to sending the command to the other window. In order to do what you want it would be
mainvar=@{abc.tempvar}
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Oct 21, 2002 3:51 am   
 
quote:

Expansion is actually preformed prior to sending the command to the other window. In order to do what you want it would be
mainvar=@{abc.tempvar}




YEEEHA! YOU ROCK!
What I really wanted was

abc:mainvar=@{def.tempvar}

But I never would have figured that out without your help! Thanks!

Oh, this is sweet!
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