1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Argument 1 passed

Discussion in 'Facepalm' started by romainbizet46, Feb 14, 2018.

  1. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    I try to update an old plugin but i have an error when i join m'y server.

    PHP:
    [16:06:18] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerPreLoginEvent' to 'PocketPerms v1.0.0'Argument 1 passed to PocketEssential\PocketPerms\PocketPerms::getPlayerGroup() must be an instance of pocketmine\Playerstring givencalled in /home/arma/plugins/PocketPerms-master/src/PocketEssential/PocketPerms/Permission/AddPermission.php on line 37 on PocketEssential\PocketPerms\PPListener\JoinListener                                         

    [16:06:18] [Server thread/CRITICAL]: TypeError"Argument 1 passed to PocketEssential\PocketPerms\PocketPerms::getPlayerGroup() must be an instance of pocketmine\Player, string given, called in /home/arma/plugins/PocketPerms-master/src/PocketEssential/PocketPerms/Permission/AddPermission.php on line 37" (EXCEPTIONin "PocketPerms-master/src/PocketEssential/PocketPerms/PocketPerms" at line 136
    PHP:
    $permissions $this->plugin->getPlayerGroup($this->plugin->getPlayerGroup($player))['Permissions'];//line37
    public function getPlayerGroup(Player $player){//line136
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    because $player is a string not a Player object?
     
  3. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    I realy need help please
     
  4. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    please post more surrounding code.
     
  5. di2134876

    di2134876 Spider Jockey

    Messages:
    29
    GitHub:
    dk1234987
    Because $player is a string and not a player object
    Send the code where $player is defined
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.