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 ➜ Perlscript ➜ error...

error...

Posting of new messages is disabled at present.

Refresh page


Posted by Oberon2   (3 posts)  Bio
Date Mon 27 Jan 2003 09:08 PM (UTC)
Message
Error number: -2147221005
Event: finding CLSID of scripting language "PerlScript"
Description: Error -2147221005 occurred when finding CLSID of scripting language "PerlScript":

Invalid class string

Called by:


I get this when I try to set up perl scripting. I have version 3.27. The only thing that I can figure might be the problem is the file I've declared - C:\bin\mush.pl. It does exist, and as far as I can tell is a valid file, the contents of which are this:

sub GemSorter
{
my ($strTriggerName, $trig_Line, $wildcards) = @_;

$quality = $world->GetTriggerInfo ($strTriggerName, 101);

if ($quality < 26)
$world->Note ("put gem low");

if ($quality > 25 && $quality < 51)
$world->Note ("put gem mid");

if ($quality > 50 && $quality < 81)
$world->Note ("put gem good");

if ($quality > 80 && $quality < 100)
$world->Note ("put gem high");

if ($quality == 100)
$world->Note ("put gem chest");
}

and nothing else. Thoughts?
Top

Posted by Shadowfyr   USA  (1,788 posts)  Bio
Date Reply #1 on Mon 27 Jan 2003 09:40 PM (UTC)
Message
This error seems to imply that it can't find the script engine. In other words COM is asking the registry to give it a link to the EXE of the script engine, but the CLSID for the engine is not listed in there as an installed component. Are you certain you have PerlScript installed on your computer?
Top

Posted by Oberon2   (3 posts)  Bio
Date Reply #2 on Mon 27 Jan 2003 10:01 PM (UTC)
Message
Actually, no, I wasn't aware it had to be installed. I figured it was a native part of MushClient. Goes to show what happens when you make assumptions, I guess.

I'll be looking for docs on how to install perlscript. If you should happen to get this and know where they are off the top of your head, could you post the page just in case I haven't had any luck?
Thanks,
Oberon
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Tue 28 Jan 2003 12:21 AM (UTC)
Message
See MUSHclient scripting functions - there is a reference near the top of the page to downloading Perl.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dubthach   (47 posts)  Bio
Date Reply #4 on Thu 30 Jan 2003 02:29 PM (UTC)
Message
Your script has some problems in it, curly braces aren't optional in if statements in Perl.


if ($foo)
    dothing(); # <--- Error!

if ($foo)
{
    dothing(); # <--- Correct
}


Get windows perl from www.activestate.com.
Top

Posted by Oberon2   (3 posts)  Bio
Date Reply #5 on Thu 30 Jan 2003 03:13 PM (UTC)
Message
Thankee kindly, sir. Making those changes and installing ActivePerl now.
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.


18,978 views.

Posting of new messages is disabled at present.

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.