Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ question about assign value of mushclient variable to local variable

question about assign value of mushclient variable to local variable

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Hefan   (12 posts)  Bio
Date Tue 17 Aug 2004 03:02 PM (UTC)
Message
o.k. i'm trying to do something like this:
i have an alias "assign *", and it calls a sub "assign (name,object,wildcs)".
what this sub does is to assign the value of this mushclient variable that i assigned in that alias to a local variable in my plugin that has the same name with this mushclient variable.
so say i type "assign test" and have a mushclient variable "test" with value "true", i also have a local variable "test" in my plugin. the result should be both of my local variable "test" and mushclient variable "test" have a value of true.
this is the coding i have:
dim test
sub assign (name,object,wildcs)
wildcs (1)=world.getvariable("wildcs (1)") 'this is where i have the problem, not sure if what i did here works
world.note wildcs (1)
end sub

Thanks for help!:)
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Tue 17 Aug 2004 07:37 PM (UTC)
Message
wildcs (1)=world.getvariable("wildcs (1)")
What was the point of that line?
You dont need to use getvariable.
Or are you trying to use it as a pointer?

<aliases>
<alias
match="assign *"
enabled="y"
send_to="12"
sequence="100"
>
<send>note getvariable(&quot;%1&quot;)</send>
</alias>
</aliases>

This is the more widely used (now) method of scripts for individual triggers. It allows them to be incapsulated. So, if you dont need to use this for multiple aliases, this is probably the way to go.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #2 on Tue 17 Aug 2004 07:57 PM (UTC)

Amended on Tue 17 Aug 2004 07:59 PM (UTC) by Magnum

Message
Sub Assign (Name, Object, Wildcs)
  World.SetVariable Wildcs(1), vbTrue
  Execute Wildcs(1) & " = vbTrue"
  World.Note Wildcs(1)
End Sub

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,262 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.