it's part of the code - namespace VLaMiN\VKontakte; use pocketmine\Server; use pocketmine\plugin\PluginBase; use pocketmine\event\Listener; use pocketmine\scheduler\ClosureTask; use pocketmine\entity\Entity; use pocketmine\utils\Utils; use pocketmine\utils\UUID; use pocketmine\utils\Config; use pocketmine\utils\TextFormat as F; Class Main extends PluginBase implements Listener { private $config; public function onEnable() { $this->getServer()->getPluginManager()->registerEvents($this, $this); $this->getDataFolder(); $this->getScheduler()->scheduleRepeatingTask(new ClosureTask); $this->getConfig()->get("timer"); $this->saveDefaultConfig(); $this->getLogger()->info(F::YELLOW. "Плагин AutoStatusVK включён!"); } public function onRun(int $currentTick) : void{ And that's his mistake [Server thread/CRITICAL]: ArgumentCountError: "Too few arguments to function pocketmine\scheduler\ClosureTask::__construct(), 0 passed in /root/PMMPLinuxInstaller/ pmmp/plugins/!Vkkkkkk/src/VLaMiN/VKontakte/Main.php on line 23 and exactly 1 expected" (EXCEPTION) in "pmsrc/src/pocketmine/scheduler/ClosureTask" at line 51 what do I do to fix it? 23 the string is $this->getScheduler()->scheduleRepeatingTask(new ClosureTask);
PHP: $this->getScheduler()->scheduleRepeatingTask(new ClosureTask); You pass no arguments to ClosureTask constructor. This page is outdated, but the class itself hasn't changed in these years, so it will be useful to look here: https://apidoc.pmmp.io/d3/df3/classpocketmine_1_1scheduler_1_1_closure_task.html