1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Error: Trying to access array offset on value of type bool

Discussion in 'Plugin Help' started by WEATHERCRAFTYT1, Jan 18, 2021.

  1. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    I have this UHC Run Plugin and I was just testing it to see if it works. It was working before but now when the game starts I get this error.
    PHP:
    [265]             if($data!=null) {
    [
    266]                $clan $data->get("MY_CLAN");
    [
    267]                   if($clan!=null) {
    [
    268]                  $stting = new Config($this->getDataFolder()."CLAN/".$clan.".yml"Config::YAML);
    [
    269]                  $cords $stting->get("CLAN_UHC_CORDS");
    [
    270]                  $y rand(40,60);
    [
    271]                 $yaw $pl->yaw;
    [
    272]                 $pit $pl->pitch;
    [
    273]                 $level $this->getServer()->getLevelByName($arena);
    [
    274]                  $pl->teleport(new Position($cords["X"]+0.5$y+1,$cords["Z"]+0.5,$level),$yaw,$pit);
    [
    275]                      }
    [
    276]                 }
    it was on 274 and I don’t know why this is happening


    PHP:
    Backtrace:
    #0 plugins/UHC HARDCORE-master/src/Uhcr/sttings/Sttings(274): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[51] Trying to access array offset on value of type bool, string[72] /home/container/plugins/UHC HARDCORE-master/src/Uhcr/sttings/Sttings.php, integer 274, array[10])
    #1 plugins/UHC HARDCORE-master/src/Uhcr/task/UHCTask(170): Uhcr\Uhcr->isTeleport(object specter\network\SpecterPlayer, string[4] UHC1)
    #2 pmsrc/src/pocketmine/scheduler/TaskHandler(137): Uhcr\task\UHCTask->onRun(integer 7126)
    #3 pmsrc/src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 7126)
    #4 pmsrc/src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 7126)
    #5 pmsrc/src/pocketmine/Server(2390): pocketmine\plugin\PluginManager->tickSchedulers(integer 7126)
    #6 pmsrc/src/pocketmine/Server(2153): pocketmine\Server->tick()
    #7 pmsrc/src/pocketmine/Server(1993): pocketmine\Server->tickProcessor()
    #8 pmsrc/src/pocketmine/Server(1587): pocketmine\Server->start()
    #9 pmsrc/src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
    #10 pmsrc/src/pocketmine/PocketMine(302): pocketmine\server()
    #11 pmsrc(11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
     
    Last edited: Jan 18, 2021
  2. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
  3. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Your config is missing CLAN_UHC_CORDS or it is not an array
     
    Primus likes this.
  4. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    I’m guessing it is not in array I check config and it was there.
    I’m not sure how to fix this, this never happened before
     
    Last edited: Jan 19, 2021
  5. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    PHP:
    [265]             if($data!=null) {
    [
    266]                $clan $data->get("MY_CLAN");
    [
    267]                   if($clan!=null) {
    [
    268]                  $stting = new Config($this->getDataFolder()."CLAN/".$clan.".yml"Config::YAML);
    [
    269]                  $cords $stting->getNested("CLAN_UHC_CORDS");
    [
    270]                  $y rand(40,60);
    [
    271]                 $yaw $pl->yaw;
    [
    272]                 $pit $pl->pitch;
    [
    273]                 $level $this->getServer()->getLevelByName($arena);
    [
    274]                  $pl->teleport(new Position($cords["X"]+0.5$y+1,$cords["Z"]+0.5,$level),$yaw,$pit);
    [
    275]                      }
    [
    276]                 }
    if nothing worked use getNested
     
  6. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
  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.