question about assign value of mushclient variable to local variable

Posted by Hefan on Tue 17 Aug 2004 03:02 PM — 3 posts, 17,316 views.

#0
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!:)
USA #1
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.
Canada #2
Sub Assign (Name, Object, Wildcs)
  World.SetVariable Wildcs(1), vbTrue
  Execute Wildcs(1) & " = vbTrue"
  World.Note Wildcs(1)
End Sub