[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Trigger -> script throwing popup

Trigger -> script throwing popup

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


Posted by Zook   (2 posts)  [Biography] bio
Date Sat 23 Oct 2004 04:21 AM (UTC)
Message
Here's my RegEx:
((?:.*) (?:damaged) (.*) just broke(.*))

Here's my script:
function brokenItem(name, line, wildcardsVB) {
wildcards = VBArray(wildcardsVB).toArray();
world.Note("Broken " + wildcards[1] + " detected...");
world.Execute("drop " + wildcards[1]);
world.Execute("get " + wildcards[1] + " from backpack");
world.Execute("use " + wildcards[1]);
}

Now when I test (with string below) the process works. The commands are sent to the world, but only after I clear a message box with the following information

Quote:

Error: -2146827282
Event: Execution of line 1 column 11
Description:
Expected ')'
Line in error:
(Lopthiss your damaged spear just broke!)
[\quote]
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 23 Oct 2004 05:04 AM (UTC)
Message
I have tried that and it works without the error message.

What version of MUSHclient do you have, and what version of JScript? There is a JScript Version plugin on this page:

http://www.gammon.com.au/mushclient/plugins/

That will tell you your version of JScript.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Zook   (2 posts)  [Biography] bio
Date Reply #2 on Sat 23 Oct 2004 02:58 PM (UTC)
Message
Well, I changed my approach and now it works. Instead of calling the function from an external JS file, I simply filled in the 'Send' box with the script and now it works fine.

FYI:
MUSHclient v3.50
Javascript Engine: v5.6
[Go to top] 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.


10,118 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]