Postado Agosto 3, 2014 10 anos eae galera do tibiaking então estou com problemas ... no meu site quando eu tento criar um kankuro,madara,obito,temari... aparece o seguinte erro aki está a linha 133 e algumas mais ... abaixo dela $char_to_copy_name = $config['newchar_vocations'][$_POST['world']][$_POST['vocation']]; $ots = POT::getInstance(); $ots->connect(POT::DB_MYSQL, connection()); $char_to_copy = new OTS_Player(); $char_to_copy->find($char_to_copy_name); $this->load->model("character_model"); /* This code (Most of it actually) has been taken from Gesior AAC. */ $account_logged = $ots->createObject('Account'); $account_logged->load($this->character_model->getAccountID()); if(!$char_to_copy->isLoaded()) { show_error('Sample character could not be found!'); } if($_POST['sex'] == "0") $char_to_copy->setLookType(136); $player = $ots->createObject('Player'); $player->setName($this->strFirst($_POST['name'])); $player->setAccount($account_logged); $player->setWorld($_POST['world']); $player->setGroup($char_to_copy->getGroup()); $player->setSex($_POST['sex']); $player->setVocation($char_to_copy->getVocation()); $player->setConditions($char_to_copy->getConditions()); $player->setRank($char_to_copy->getRank()); $player->setLookAddons($char_to_copy->getLookAddons()); $player->setTownId($_POST['city']); $player->setExperience($char_to_copy->getExperience()); $player->setLevel($char_to_copy->getLevel()); $player->setMagLevel($char_to_copy->getMagLevel()); $player->setHealth($char_to_copy->getHealth()); $player->setHealthMax($char_to_copy->getHealthMax()); $player->setMana($char_to_copy->getMana()); $player->setManaMax($char_to_copy->getManaMax()); $player->setManaSpent($char_to_copy->getManaSpent()); $player->setSoul($char_to_copy->getSoul()); $player->setDirection($char_to_copy->getDirection()); $player->setLookBody($char_to_copy->getLookBody()); $player->setLookFeet($char_to_copy->getLookFeet()); $player->setLookHead($char_to_copy->getLookHead()); $player->setLookLegs($char_to_copy->getLookLegs()); $player->setLookType($char_to_copy->getLookType()); $player->setCap($char_to_copy->getCap()); $player->setPosX($startPos['x']); $player->setPosY($startPos['y']); $player->setPosZ($startPos['z']); $player->setLossExperience($char_to_copy->getLossExperience()); $player->setLossMana($char_to_copy->getLossMana()); $player->setLossSkills($char_to_copy->getLossSkills()); $player->setLossItems($char_to_copy->getLossItems()); $player->setLossContainers($char_to_copy->getLossContainers()); $player->save(); $_SESSION['characterDelay'] = time(); unset($player); $player = $ots->createObject('Player'); $player->find($_POST['name']); if($player->isLoaded()) { $player->setCustomField('world_id', (int) $_POST['world']); $player->setSkill(0,$char_to_copy->getSkill(0)); $player->setSkill(1,$char_to_copy->getSkill(1)); $player->setSkill(2,$char_to_copy->getSkill(2)); $player->setSkill(3,$char_to_copy->getSkill(3)); $player->setSkill(4,$char_to_copy->getSkill(4)); $player->setSkill(5,$char_to_copy->getSkill(5)); $player->setSkill(6,$char_to_copy->getSkill(6)); $player->save(); $SQL = POT::getInstance()->getDBHandle(); $loaded_items_to_copy = $SQL->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId().""); foreach($loaded_items_to_copy as $save_item) $SQL->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');"); if($ajax == 0) $ide->redirect(WEBSITE.'/index.php/account/index/1'); else bom é isso galera espero a ajuda de vocês para resolver este problema Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
Postado Agosto 3, 2014 10 anos É NTO? Criou os samples na database? Ajudei? De nada \o/ Att Rusherzin
Postado Agosto 3, 2014 10 anos Autor sim print dos samples \/ Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
Postado Agosto 3, 2014 10 anos Esse erro é ao tentar criar um character né? Posta seu config.php Ajudei? De nada \o/ Att Rusherzin
Postado Agosto 3, 2014 10 anos Autor está ai /*List of vocation available to choose when creating new character*/ $config['vocations'] = array(1=>"Naruto", 13=>"Sasuke", 25=>"Lee", 34=>"Sakura", 50=>"Gaara", 70=>"Neji", 90=>"Kiba", 110=>"Shikamaru", 130=>"Hinata", 150=>"Tenten", 210=>"Madara", 220=>"Obito", 290=>"Kankuro", 320=>"Temari", 190=>"Killer Bee", 200=>"Kakashi"); /*List of vocation that exists on server*/ $config['server_vocations'] = array(1=>"Naruto", 13=>"Sasuke", 25=>"Lee", 34=>"Sakura", 50=>"Gaara", 70=>"Neji", 90=>"Kiba", 110=>"Shikamaru", 130=>"Hinata", 150=>"Tenten", 210=>"Madara", 220=>"Obito", 290=>"Kankuro", 320=>"Temari", 190=>"Killer Bee", 200=>"Kakashi"); /*Names of vocations as in database as samples. First key is world id and second vocation id.*/ $config['newchar_vocations'][0][1] = "Naruto Sample"; $config['newchar_vocations'][0][13] = "Sasuke Sample"; $config['newchar_vocations'][0][25] = "Lee Sample"; $config['newchar_vocations'][0][34] = "Sakura Sample"; $config['newchar_vocations'][0][50] = "Gaara Sample"; $config['newchar_vocations'][0][70] = "Neji Sample"; $config['newchar_vocations'][0][90] = "Kiba Sample"; $config['newchar_vocations'][0][110] = "Shikamaru Sample"; $config['newchar_vocations'][0][130] = "Hinata Sample"; $config['newchar_vocations'][0][150] = "Tenten Sample"; $config['newchar_vocations'][0][170] = "Itachi Sample"; $config['newchar_vocations'][0][190] = "Killer Bee Sample"; $config['newchar_vocations'][0][200] = "Kakashi Sample"; $config['newchar_vocations'][1][1] = "Naruto Sample"; $config['newchar_vocations'][13][13] = "Sasuke Sample"; $config['newchar_vocations'][25][25] = "Lee Sample"; $config['newchar_vocations'][34][34] = "Sakura Sample"; $config['newchar_vocations'][50][50] = "Gaara Sample"; $config['newchar_vocations'][70][70] = "Neji Sample"; $config['newchar_vocations'][90][90] = "Kiba Sample"; $config['newchar_vocations'][110][110] = "Shikamaru Sample"; $config['newchar_vocations'][130][130] = "Hinata Sample"; $config['newchar_vocations'][150][150] = "Tenten Sample"; $config['newchar_vocations'][170][170] = "Itachi Sample"; $config['newchar_vocations'][190][190] = "Killer Bee Sample"; $config['newchar_vocations'][200][200] = "Kakashi Sample"; Editado Agosto 3, 2014 10 anos por brunds (veja o histórico de edições) Projeto ATS (Naruto)Informações AbaixoFacebookYoutubeDiscord Tutoriais / ConteúdosClique Aqui
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.