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.
 Entire forum ➜ MUSHclient ➜ General ➜ What is this VBArray(wildcards).toArray() that I see everywhere?

What is this VBArray(wildcards).toArray() that I see everywhere?

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


Posted by Phatj   (4 posts)  Bio
Date Sun 23 Feb 2003 02:35 PM (UTC)
Message
What is the deal with VBArray and wildcard? Ive been searching the forums, and most people who post scripts have something like that in their script, even the people using jscript (which I use, coming from C). Can anyone give me the run-down on VBArray and wildcards? Thanks.
Top

Posted by Phatj   (4 posts)  Bio
Date Reply #1 on Sun 23 Feb 2003 02:36 PM (UTC)
Message
Oh and one more question... can anyone refer me to a help file on using delays with Jscript... or just post some help here? Thanks.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #2 on Mon 24 Feb 2003 12:41 AM (UTC)
Message
The arrays sent to scripts, like arrays of wildcards, are the "variant" data type which is really a Microsoft-specific data type. It is a multi-purpose data type, where there is a byte that says what it is (eg. number, string, date, array etc.) and then the data itself.

It matches up well with VBscript which also uses variant data type internally, thus in VBscript you don't need to do the toArray.

However JScript (Java script) which is not really a proprietary Microsoft product, does not directly understand variant arrays, so you need to do the toArray function that converts from a VB array to a Jscript array.

As for delays, there are many, many posts about that. You want to make your script delay for a second? You don't want to do that directly, because it would hang the client. Search for posts about things like:

world.DoAfter (5, "go north");

This would send "go north" after 5 seconds.

- 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.


9,741 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.