Answer the question
In order to leave comments, you need to log in
I don't understand what is wrong, can you help?
at
$playerName = RankIds::PREFIX_LIST[$rank] . ($isPlayer ? "§7" : " ") . DataStorage::getValue($playerName, DataStorage::REAL_NAMES, $playerName);
ErrorException: "Undefined offset: 8" (EXCEPTION) in "plugins/StatisticsAPI/src/statisticsapi/StatisticsAPI" at line 226.
<?php
declare(strict_types=1);
namespace core\utils\types;
interface RankIds{
public const PLAYER = 0;
public const RECRUIT = 1;
public const PRIME = 2;
public const YT = 3;
public const IMMORTAL = 4;
public const EXPERIENCED = 5;
public const HELPER = 6;
public const OWNER = 0xff;
public const PREFIX_LIST = [
RankIds::PLAYER => "",
RankIds::RECRUIT => RankIds::COLOR_LIST[RankIds::RECRUIT] ."§lRecruit§r",
RankIds::PRIME => RankIds::COLOR_LIST[RankIds::PRIME] ."§lPrime§r",
RankIds::YT => RankIds::COLOR_LIST[RankIds::YT] ."§l§fYou§сTube§r",
RankIds::IMMORTAL => RankIds::COLOR_LIST[RankIds::IMMORTAL] ."§lImmortal§r",
RankIds::EXPERIENCED => RankIds::COLOR_LIST[RankIds::EXPERIENCED] ."§lExperienced§r",
RankIds::HELPER => RankIds::COLOR_LIST[RankIds::HELPER] ."§lHelper§r",
RankIds::OWNER => RankIds::COLOR_LIST[RankIds::OWNER] ."§lOwner§r"
];
public const COLOR_LIST = [
RankIds::PLAYER => "§7",
RankIds::RECRUIT => "§6",
RankIds::PRIME => "§c",
RankIds::YT => "§f",
RankIds::IMMORTAL => "§d",
RankIds::EXPERIENCED => "§b",
RankIds::HELPER => "§b",
RankIds::OWNER => "§6"
];
public const LIST = [
RankIds::PLAYER => "player",
RankIds::RECRUIT => "recruit",
RankIds::PRIME => "prime",
RankIds::YT => "yt",
RankIds::IMMORTAL => "immortal",
RankIds::EXPERIENCED => "experienced",
RankIds::HELPER => "helper",
RankIds::OWNER => "owner"
];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question