Menu

Error when running hlmaps.pl

Simon
2003-06-21
2003-06-23
  • Simon

    Simon - 2003-06-21

    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.

     
    • Brian Porter

      Brian Porter - 2003-06-21

      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!  ;-)

       
    • Simon

      Simon - 2003-06-22

      Thanks it works great.

      //Simon

       
    • Simon

      Simon - 2003-06-23

      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.

       
      • Brian Porter

        Brian Porter - 2003-06-23

        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!  ;-)

         
      • Brian Porter

        Brian Porter - 2003-06-23

        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!  ;-)

         
    • Simon

      Simon - 2003-06-23

      My perl skills are very limited so I definately need any help I can get :-)

      //Simon

       

Log in to post a comment.