Need help in editing playerRecorder.pl

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

Message
Author
Runifl
Noob
Noob
Posts: 13
Joined: 03 Sep 2008, 13:54
Noob?: No

Re: Need help in editing playerRecorder.pl

#21 Post by Runifl »

So I wanted to try the version with the settings depending on the values in the config file:

Code: Select all

return if (existsInList($config{playerRecorder_notPlayers}, $targetName));
   return if (existsInList($config{playerRecorder_notInMap}, $map));
These give me an error message once I see another player:

Code: Select all

Undefined subroutine &playerRecord::existsInList called at C:/Users/xxx/Desktop/openkore_ready/plugins/playerRecorder/macro.pl line 56.
I also tried to change it into ta regular if function:

Code: Select all

if (existsInList($config{playerRecorder_notInMap}, $field)) {
              return;
But it had the same effect.
So currently I'm using the following version:

Code: Select all

   my @notPlayers = ("x", "xxx", "xxx");
      for (@notPlayers) {
         if ($targetName eq $_) {
            return;
         }
      }
This works very good for me.
For the map I still couldn't get the variable from the "cities.txt" to work, which you were talking about at last.

I put this at the beginning:
use Globals qw(%cities_lut);
And out of this:

Code: Select all

my @notInMap = ("prontera", "geffen", "alberta", "morocc");
      for (@notInMap) {
         if ($field->baseName eq $_) {
            return;
         }
      }
I tried to make this:

Code: Select all

my @notInMap = (existsInList($cities));
      for (@notInMap) {
         if ($field->baseName eq $_) {
            return;
         }
      }
But this isn't working properly. Can you explain it a bit more clearly on how to load variables from a certain file and how to insert them into the function?

Raider
The Kore Devil
The Kore Devil
Posts: 672
Joined: 22 Feb 2013, 03:40
Noob?: No
Location: The Netherlands

Re: Need help in editing playerRecorder.pl

#22 Post by Raider »

Exactly the problem I have. Really want to know how to add the cities file.

Post Reply