world.open help

Posted by StefanWulph on Fri 09 Mar 2007 09:01 PM — 2 posts, 13,261 views.

USA #0
I'm trying to make a Vscript list that's called by an alias to open Worlds that are specific to an ident. Each ident has between 6 to 10 worlds/logins to it.
I came up with this after several hours of headbanging help files and other VBS files:

sub StefanWorlds

world.open "BM Stefan.MCL"

end sub

This called from:

<aliases>
<alias
name="OpenStefan"
script="StefanWorlds"
match="OpenStefan"
enabled="y"
group=""
variable=""
ignore_case="y"
sequence="100"
>
<send></send>
</alias>
</aliases>


When I try to call I get the ambiguous
'We expected your subroutine to have 3 arguments' error

This is why I tried awhile ago to get the option of having multiple Global World opening at the opening of MUSHClient.

*sighs* Anyway. Any help would be appreciated, Thanks.

Stefan Wulph

Australia Forum Administrator #1
It is fairly well-documented that alias and trigger scripts must have 3 arguments. Thus your sub should read:


sub StefanWorlds (name, line, wildcards)

world.open "BM Stefan.MCL"

end sub


However it is simpler to use "send to script", then you don't need to use a script file, or have any arguments, like this:


<aliases>
  <alias
   match="OpenStefan"
   enabled="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>
world.Open "BM Stefan.MCL"
</send>
  </alias>
</aliases>