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
➜ world.open help
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| StefanWulph
USA (35 posts) Bio
|
| Date
| Fri 09 Mar 2007 09:01 PM (UTC) |
| Message
| 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
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sat 10 Mar 2007 12:37 AM (UTC) |
| Message
| 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>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
12,686 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top