Errors:
Error number: -2147467259
Event: Execution of line 12 column 0
Called by: Immediate execution
Missing script subroutine procedue:
You have not specified a script file name:
The alias subroutine named "Advertise" could not be found.
The timer (RandomAd) subroutine named "Advertise" could not be found.
XML Error:
Line 48: Could not find all required script routines (problem in this file)
-----------Script----------
I'm very unfamiliar with scripting perl in mushclient, but I'm thinking I did something extremly wrong. Any help would be greatly appreciated.
The ads.txt file contains 1 line faux-ads (only about 20 of them). 1 per line, hard return at the end.
Global symbol "$linkfile" requires explicit package name at (eval 2) line 4.
Global symbol "$linkfile" requires explicit package name at (eval 2) line 5.
Global symbol "$nlines" requires explicit package name at (eval 2) line 7.
Global symbol "@file" requires explicit package name at (eval 2) line 7.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 8.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 9.
Global symbol "@file" requires explicit package name at (eval 2) line 9.
Global symbol "$nlines" requires explicit package name at (eval 2) line 9.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 10.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 12.
Not enough arguments for send at (eval 2) line 12, at EOF
(in cleanup) Global symbol "$linkfile" requires explicit package name at (eval 2) line 4.
Global symbol "$linkfile" requires explicit package name at (eval 2) line 5.
Global symbol "$nlines" requires explicit package name at (eval 2) line 7.
Global symbol "@file" requires explicit package name at (eval 2) line 7.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 8.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 9.
Global symbol "@file" requires explicit package name at (eval 2) line 9.
Global symbol "$nlines" requires explicit package name at (eval 2) line 9.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 10.
Global symbol "$returnstring" requires explicit package name at (eval 2) line 12.
Not enough arguments for send
Line in error:
Error number: -2147467259
Event: Execution of line 12 column 0
Called by: Immediate execution
Missing script subroutine procedue:
You have not specified a script file name:
The alias subroutine named "Advertise" could not be found.
The timer (RandomAd) subroutine named "Advertise" could not be found.
XML Error:
Line 48: Could not find all required script routines (problem in this file)
-----------Script----------
<?xml version="1.0" encoding="UTF-8"?>
<muclient>
<plugin name="Random_ads"
author="Matt"
language="perlscript"
id = "982581e59ab42844527eec83"
purpose = "Displays a random ad from time to time"
save_state = "y"
version = "1.1"
requires="3.31"
>
<description trim="y">
<![CDATA[
]]>
</description>
</plugin>
<!-- =============================================
Script: DoRandomAd
Purpose: Chooses an advertisement at random from a text file.
============================================= -->
<timers>
<timer
name="RandomAd"
script="Advertise"
enabled="y"
second="59"
minute="1"
>
</timer>
</timers>
<aliases>
<alias
match="doadnow"
enabled="y"
script="Advertise"
>
</alias>
</aliases>
<script>
<![CDATA[
use strict;
sub Advertise
{
$linkfile = "C:/ads.txt";
open (LINKS, "$linkfile");
srand();
$nlines=@file=<LINKS>;
$returnstring = "emot advertises, '";
$returnstring .= $file[int rand $nlines];
$returnstring .= "'";
world.send $returnstring;
close (LINKS);
}
]]>
</script>
</muclient>
I'm very unfamiliar with scripting perl in mushclient, but I'm thinking I did something extremly wrong. Any help would be greatly appreciated.
The ads.txt file contains 1 line faux-ads (only about 20 of them). 1 per line, hard return at the end.