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

Not Working

Comments in 'Plugin Development' started by Falk, Oct 29, 2013.

  1. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I am trying to schedule a function with:
    PHP:
    $this->api->schedule(10*1200, array($this"purgePlayers()"), array(), true);
    But I get the following error:
    29.10 06:49:54 [Server] ERROR A level 4096 error happened: "Argument 2 passed to PocketMinecraftServer::schedule() must be callable, array given, called in /jar/pocketmine.php(32) : eval()'d code on line 47 and defined" in "/jar/pocketmine.php(32) : eval()'d code" at line 21

    What's wrong?
    Last edited: Oct 29, 2013
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    remove the round brackets by "purgePlayers()"
    so it needs to be "purgePlayers"
    PEMapModder, JWhy and Falk like this.
  3. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I got it working now, Thanks
  4. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    wies fixes all

Share This Page

Advertisement