E' la prima volta che mi succede questo errore (vedi titolo) e non capisco davvero il motivo, pensare che ho registrato l'account e usato solo da un paio di giorni.
Vi passo un pò di codice che stavo trascrivendo, magari se è solo un problema di codice, potete aiutarmi a trovare il problema, perché io non riesco a comprendere il motivo delle immense chiamate:
Codice PHP:
#update BOSSWORLD
$CH = new CHARACTER($_COOKIE["public"]);
$B = new MOBS();
$BW = new BOSSWORLD();
$BOSS_INFO = CONF::dejson($BW->json);
$MENAGE = new MENAGE();
if($_REQUEST["w"] == "hp")
{
$B->update($BOSS_INFO["id"],$_REQUEST["w"],$_REQUEST["p"]);
QUesta è la funzione update della classe MOBS:
Codice PHP:
public function update($i,$w,$p,$reset=null){
$CH = new CHARACTER($_COOKIE["public"]);
$STAT = $this->listMobs("3","id",$i);
if($reset!=null&&$reset){
$query = "Update mobs set $w = :h where id = :i";
}
else{
$query = "Update mobs set $w = $w+:h where id = :i";
}
$HAN = CONF::PDO()->prepare($query);
$formula_damage = $this->formula($i,"damage");
if($HAN->execute(
array(
"h"=>CONF::escape(-$formula_damage),
"i"=>CONF::escape($i)
)
)){
if($p == "world"){
$this->updateLastBoss($i);
$BWD = new BOSSWORLD_DAMAGE();
$BWD->update($i);
$exp_earn = $this->formula($i,"exp");
$gold_earn = $this->formula($i,"gold");
$this->update($i,"exp",-$exp_earn);
$this->update($i,"gold",-$gold_earn);
#controllo hp se scende sotto a 0 lo reputo 0
$query = "SELECT exp,gold from mobs where id = :id";
$PDO = CONF::PDO()->prepare($query);
$PDO->execute(array("id"=>$i));
$PDO = null;
$FFORCONTROLLO0EXPEGOLD = $HAN->fetch(PDO::FETCH_OBJ);
if($FFORCONTROLLO0EXPEGOLD->exp <= 0) $this->update($i,"exp",0,$p,true);
if($FFORCONTROLLO0EXPEGOLD->g <= 0) $this->update($i,"g",0,$p,true);
}
$HAN = null;
return true;
}
else{
echo $HAN->errorInfo()[2];
$HAN = null;
return false;
}
}
Codice PHP:
class BOSSWORLD_DAMAGE extends MOBS {
public function update($idm){
$formula_damage = $this->formula($idm,"damage");
$exp_earn = $this->formula($idm,"exp");
$gold_earn = $this->formula($idm,"gold");
$query = "SELECT * FROM bossworld_damage where id_player = :id";
$HAN = CONF::PDO()->prepare($query);
$HAN->execute(array("id"=>$CH->id));
if($HAN->fetchColumn() == 0){
$query = "INSERT INTO bossworld_damage(id_player,damage,exp_earn,gold_earn) VALUES(:id,:d,:e,:g)";
$PDO = CONF::PDO()->prepare($query);
$PDO->execute(array("id"=>$CH->id,"d"=>$formula_damage,"e"=>$exp_earn,"g"=>$gold_earn));
$PDO = null;
}
else{
$query = "UPDATE bossworld_damage set damage = damage+:d, exp_earn = exp_earn+:e, gold_earn = gold_earn+:g where id_player = :id";
$PDO = CONF::PDO()->prepare($query);
$PDO->execute(array("id"=>$CH->id,"d"=>$formula_damage,"e"=>$exp_earn,"g"=>$gold_earn));
$PDO = null;
}
$HAN = null;
}
}