error...

Posted by Oberon2 on Mon 27 Jan 2003 09:08 PM — 6 posts, 26,113 views.

#0
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?
USA #1
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?
#2
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
Australia Forum Administrator #3
See MUSHclient scripting functions - there is a reference near the top of the page to downloading Perl.
#4
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.
#5
Thankee kindly, sir. Making those changes and installing ActivePerl now.