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
anylo
Beginner


Joined: 21 Feb 2001
Posts: 28
Location: Finland

PostPosted: Mon Jan 13, 2003 11:53 am   

[6.40] Get/Set variables from VBScript
 
How can I access a variable from VBScript and change it?

Something like changing the value of the string etc.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jan 13, 2003 12:28 pm   
 
You have more than one way of doing it. Take a look at the zMUD as a COM Server article in the Support Library.

Basicaly, you can either execute the #VAR command:
sess.ProcessCommand("#VAR myvar value")

or get a reference to the variable you want and work with it:
myvar = sess.GetVar("myvar", "")
myvar.Value = value

Note: Please excuse my possibly incorrect syntax - I do not use VBScript.

Kjata
Reply with quote
anylo
Beginner


Joined: 21 Feb 2001
Posts: 28
Location: Finland

PostPosted: Mon Jan 13, 2003 3:44 pm   
 
Thanks, it worked fine.

Just made a trigger which replies the local weather to the teller, script can be found at http://www.cc.jyu.fi/~anjoylon/jumbo/weather.txt
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