Task issue

Discussion in 'Development' started by Astro, Nov 24, 2018.

  1. Astro

    Astro Witch

    Messages:
    50
    GitHub:
    RealAstro
    24.11 18:56:13 [Server] Server thread/CRITICAL Could not execute task InfernalCore\EnderVaults\EVTask: Too few arguments to function InfernalCore\EnderVaults\EVTask::construct(), 3 passed in /plugins/INCore/src/InfernalCore/EnderVaults/EVTask.php on line 224 and exactly 4 expected 24.11 18:56:13 [Server] Server thread/CRITICAL ArgumentCountError: "Too few arguments to function InfernalCore\EnderVaults\EVTask::construct(), 3 passed in /plugins/INCore/src/InfernalCore/EnderVaults/EVTask.php on line 224 and exactly 4 expected" (EXCEPTION) in "INCore/src/InfernalCore/EnderVaults/EVTask" at line 30


    line 30: public function __construct(EnderVault $endervault, Player $player, int $spins, Main $plugin) {
    line 224: if($this->spins < 4) $scheduler->scheduleDelayedTask(new EVTask($this->endervault, $this->player, $this->spins, $this->plugin), 30);
     
  2. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    593
    var_dump() whatever you passed to the constructor
     
  3. Astro

    Astro Witch

    Messages:
    50
    GitHub:
    RealAstro
    PHP:
        public function __construct(EnderVault $endervaultPlayer $playerint $spinsMain $plugin) {
            
    $this->endervault $endervault;
            
    $this->player $player;
            
    $this->spins $spins;
            
    $this->plugin $plugin;
        }
     
  4. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    593
    Do you know what var_dump() does?
     
  5. Astro

    Astro Witch

    Messages:
    50
    GitHub:
    RealAstro
    yes i do
     

Share This Page

  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.