Hi I get the following error when I run hlmaps.pl:
c:\inetpub\wwwroot\scripts\hlmaps.pl line 674. [Sat Jun 21 14:30:00 2003] hlmaps.pl: Use of uninitialized value in string eq at
I noticed this error when I was developing the PHP version of HLmaps, but didn't think much of it since I was working on a new version. I believe this error occurs when hlmaps.pl doesn't get the real-time stats correctly, and leaves a variable called "$active_map" uninitialized. You should be able to fix this by adding the following code AFTER line 416 of hlmaps.pl:
416: } # Else we timed out - do nothing
####NEW-START####
else
{
$active_map = -1;
}
####NEW-END####
So instead of "doing nothing" as the comment says, we're going to set $active_map to a value of -1, which means it has a value, but will never match anything when it's used later on line 674. Does that make sense?
Try that change and post back here to let me know if it worked. Good luck, and thanks for using HLmaps! ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found that you got the same error on line 677 eventhough that I implemented your fix. What I did to fix it where to add the following line
$active_map = "-1";
in the set_default_values subroutine. Now it seems to work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I get the following error when I run hlmaps.pl:
c:\inetpub\wwwroot\scripts\hlmaps.pl line 674. [Sat Jun 21 14:30:00 2003] hlmaps.pl: Use of uninitialized value in string eq at
I access the page at http://fromhell.kicks-ass.net/scripts/hlmaps.pl
Then I click on the Moddate link and then I get the error message above on the de_cbble map.
Running hlmaps.cron and hlmaps.pl works ok appart from this.
I noticed this error when I was developing the PHP version of HLmaps, but didn't think much of it since I was working on a new version. I believe this error occurs when hlmaps.pl doesn't get the real-time stats correctly, and leaves a variable called "$active_map" uninitialized. You should be able to fix this by adding the following code AFTER line 416 of hlmaps.pl:
416: } # Else we timed out - do nothing
####NEW-START####
else
{
$active_map = -1;
}
####NEW-END####
So instead of "doing nothing" as the comment says, we're going to set $active_map to a value of -1, which means it has a value, but will never match anything when it's used later on line 674. Does that make sense?
Try that change and post back here to let me know if it worked. Good luck, and thanks for using HLmaps! ;-)
Thanks it works great.
//Simon
I found that you got the same error on line 677 eventhough that I implemented your fix. What I did to fix it where to add the following line
$active_map = "-1";
in the set_default_values subroutine. Now it seems to work.
Yeah, I thought about that after I posted. Initializing the variable to -1 is a better solution. See, you didn't need us at all! ;-)
Yeah, I thought about that after I posted. Initializing the variable to -1 is a better solution. See, you didn't need us at all! ;-)
My perl skills are very limited so I definately need any help I can get :-)
//Simon