menu
#9648589 Undefined variable $fishType

Submitted by PocketMine-MP 5.8.2

General information

Version: 5.8.2
Git commit: c3c81b09
Plugin involvement: Direct
Report date: 2023-11-20 23:53:33 +0000 UTC
Server uptime: 0 days 0 hours 3 minutes 23 seconds

System Information

PHP version: 8.1.25
JIT status: Not available
Operating system: linux
System banner: Linux 4eac9506-9e8a-4561-87b9-16f0e1c4ec25 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64

Error information

Warning: the DarkRankup plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Undefined variable $fishType
File: plugins/DarkRankup/src/score/FishingTask
Line: #44
Type: ErrorException
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
                    $randomNumber = mt_rand(0, 99);

$itemInHand = $player->getInventory()->getItemInHand();
$namedTag = $itemInHand->getNamedTag();
if ($itemInHand instanceof FishingRod){
if ($namedTag instanceof CompoundTag && $namedTag->getString("level1")) {

$player->sendTip("Pescando...");
if ($randomNumber < 15) {
$player->sendTip(" §a+1 $fishType");
$fishType = $this->getRandomFishType();
$this->incrementFishCount($player->getName(), $fishType);
}
}
}
}
}
}
}

#0 plugins/DarkRankup/src/score/FishingTask(44): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[28] Undefined variable $fishType, string[60] /home/container/plugins/DarkRankup/src/score/FishingTask.php, int 44)
#1 pmsrc/src/scheduler/TaskHandler(113): score\FishingTask->onRun()
#2 pmsrc/src/scheduler/TaskScheduler(137): pocketmine\scheduler\TaskHandler->run()
#3 pmsrc/src/plugin/PluginManager(533): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 3021)
#4 pmsrc/src/Server(1791): pocketmine\plugin\PluginManager->tickSchedulers(int 3021)
#5 pmsrc/src/Server(1680): pocketmine\Server->tick()
#6 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#7 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[16] /home/container/, string[24] /home/container/plugins/)
#8 pmsrc/src/PocketMine(364): pocketmine\server()
#9 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show