Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error Help

Comments in 'Plugin Development' started by PocketMinecrafter95, Sep 21, 2013.

  1. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    Error :
    [ERROR] A level 4096 error happened: "Argument 2 passed to PocketMinecraftServer::addHandler() must be callable, array given, called in C:\Users\User\Desktop\PocketMine-MP\src\API\ServerAPI.php on line 315 and defined" in "C:\Users\User\Desktop\PocketMine-MP\src\PocketMinecraftServer.php" at line 269
    PLEASE HELP !!! :confused:
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    In one of your plugins it points the addhandle to a non existing function
  3. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    What plugins do you have uploaded?
  4. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    I am testing my own plugin.
  5. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
  6. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    May I see it (I promise not to distribute)
  7. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    Okay. I'll send you in your inbox.
  8. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Did you initialize the API by using $this->api = ServerAPI::request() ?
  9. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    It's $this->api = $api;
    and he most likely did something simular to this:
    PHP:
    $this->api->addHandler('player.block.touch', array($this'blocktouch'));

    .....

    public function 
    playerblocktouch($data$event){
    }
    Notice that the method name should be blocktouch instead of playerblocktouch.

Share This Page

Advertisement