[Server thread/CRITICAL]: Error: "Call to a member function getAll() on array" (EXCEPTION) in "plugins/sexdcore/src/xinghao2003/SEXDCore/Main" at line 785 #error ^ #code v public function getDJList(){ $text = "§l§d-================ §eTop10 Lv §d================-\n"; $gl = $this->getPlugin("Grade"); if(is_null($gl)){ $text .= "No plugin!"; }else{ $tmp = []; $glData = $gl->exp->getAll(); if(count($glData) < 1) return $text; foreach($glData as $$playerName => $data){ $tmp[$playerName] = (int)["grade"]; } arsort($tmp); $num = 0; foreach($tmp as $playerName => $dengji){ $num++; if($num > 10) break; $text .= " §l§6TOP{$num} >> Name: {$playerName} Lv: {$dengji}\n"; } } return $text; } #config V --- sdsd16: exp: 1 grade: 18 maxHealth: 54 MI: 0 fix: ""
Error: "Call to a member function getAll() on array" (EXCEPTION) in "plugins/sexdcore/src/xinghao2003/SEXDCore/Main" at line 785 can I see the Main?
Please use code and php tags in order to make code more readable, you can do this by pressing the "+" button of the post field and then pressing "Code". You can also write it like this: [php]php code here[/php] or [code]config files here [/code]