Gossamer Forum
Quote Reply
Annoying error!
Argh..this is stupid! All I'm trying to do is print out the readme for a plugin...I'm getting this error;


A fatal error has occured:

Quote:
Can't use string ("28461") as a SCALAR ref while "strict refs" in use at /usr/local/psa/home/vhosts/ace-host.com/httpdocs/dumps/admin/Plugins/Duplicate_Check.pm line 63.

Please enable debugging in setup for more details.

The HTML I am using looks ok to me...all the @'s are escaped, and the Perl checker does not return any problems. Does anyone know what may cause this problem? If you need to see the sub, please let me know, and I'll paste it over for ya Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Annoying error! In reply to
Seeing the code would help.
Quote Reply
Re: [Paul] Annoying error! In reply to
Its mainly HTML, so I can't see why it won't work!

It is;

Code:
sub readme {
# -------------------------------------------------------------------
# This subroutine will get called whenever the user clicks
# on 'Readme' in the admin menu. Remember, you need to print
# your own content-type headers; you should use
#
print $IN->header();
#

print qq|

<html>

<head>
</head>

<body>

<p align="center"><b><font face="Verdana">Duplicate_Check</font></b></p>
<p align="center"><font face="Verdana" size="2">There is nothing really needed
here. All that will happen, is that if a link has been submitted already, the
user will get an error, and the link will not be added again. Pretty simple :)
No changes are needed from the user/admin end. If you like this plugin, please
consider sending me a little $$$'s from
<a target="_blank" href="http://www.ace-installer.com/pay.php">
http://www.ace-installerk.com/pay.php</a>.</font></p>
<p align="center"><font face="Verdana" size="2">Cheers</font></p>
<p align="center"><font face="Verdana" size="2">Andy<br>
<a href="mailto:webmaster\@ace-installer.com">webmaster\@ace-installer.com</a><br>
<a target="_blank" href="http://www.ace-installer.com">
http://www.ace-installer.com</a> </font></p>

</body>

</html>


|;

}

If I just replace that with;

Code:
sub readme {
# -------------------------------------------------------------------
# This subroutine will get called whenever the user clicks
# on 'Readme' in the admin menu. Remember, you need to print
# your own content-type headers; you should use
#
print $IN->header();

print "test";

}

Then it works fine, and prints "test" Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Annoying error! In reply to
$$$

$$ is the scripts process ID, $$var is a scalar reference, hence $$$ makes perl think you are trying to print out the process id as a scalar reference.

Escape the dollar signs or simply use q| | instead of qq| | then you don't need to escape them, including @

Last edited by:

Paul: Aug 15, 2002, 11:50 AM
Quote Reply
Re: [Andy] Annoying error! In reply to
maybe try removing this:



$$$'s
Quote Reply
Re: [Paul] Annoying error! In reply to
LOl..I literally fixed it a second ago, and was just about to post a reply. It said I was the last to reply Unsure Oh well...cheers for the help though. I should have known better...as I has had this problem before!

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!