vakacjus
Lua & C++ Study.
- Joined
- Oct 23, 2008
- Messages
- 255
- Solutions
- 1
- Reaction score
- 26
Hello guys
I've got a problem with creating a new character by Gesior AAC, doing it localy.
Screenshot
Screenshot
I've changed the config.php
Error durning creating the Character looks like this. Kinda dunno where to start.
Screenshot
File: C:\Users\Camelot\Desktop\UniServerZ\www\classes/player.php Line: 63
File: C:\Users\Camelot\Desktop\UniServerZ\www\pages/accountmanagement.php Line: 1131
File: C:\Users\Camelot\Desktop\UniServerZ\www\system/load.page.php Line: 7
File: C:\Users\Camelot\Desktop\UniServerZ\www/index.php Line: 37
I've got a problem with creating a new character by Gesior AAC, doing it localy.
Screenshot
Screenshot
I've changed the config.php
Code:
<?PHP
# Account Maker Config
$config['site']['serverPath'] = "C:/Users/Camelot/Desktop/otxserver-new-master/";
$config['site']['useServerConfigCache'] = false;
$towns_list = array(
1 => 'Venore',
2 => 'Thais',
3 => 'Kazordoon',
4 => 'Carlin',
5 => 'Ab Dendriel',
6 => 'Rookgaard',
7 => 'Liberty Bay',
8 => 'Port Hope',
9 => 'Ankrahmun',
10 => 'Darashia',
11 => 'Edron',
12 => 'Svargrond',
13 => 'Yalahar',
14 => 'Farmine',
15 => 'Gray Beach',
16 => 'Roshamuul',
30 => 'Rathleton');
# Create Account Options
$config['site']['one_email'] = true;
$config['site']['create_account_verify_mail'] = false;
$config['site']['email_days_to_change'] = 5;
$config['site']['newaccount_premdays'] = 3065;
$config['site']['send_register_email'] = false;
$config['site']['verify_code'] = true;
# Create Character Options
$config['site']['newchar_vocations'] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_towns'] = array(2 => 'Thais', 1 => 'Venore', 11 => 'Edron', 4 => 'Carlin');
$config['site']['max_players_per_account'] = 7;
Error durning creating the Character looks like this. Kinda dunno where to start.
Code:
Error occured!
Error ID:
More info: Player::save() - insert failed\nqueryUsed = INSERT INTO `players` (`name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `balance`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `deleted`, `create_ip`, `create_date`, `comment`, `hide_char`) VALUES ('Cero', '1', '165', '8', '1', '180', '180', '4200', '0', '95', '78', '115', '128', '0', '0', '35', '35', '0', '100', 'Thais', '0', '0', '0', '', '400', '1', '0', '0', '1', '0', '0', '0', '0', '0', '2520', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '0', '', '1527013409', '', '0')
File: C:\Users\Camelot\Desktop\UniServerZ\www\classes/player.php Line: 63
File: C:\Users\Camelot\Desktop\UniServerZ\www\pages/accountmanagement.php Line: 1131
File: C:\Users\Camelot\Desktop\UniServerZ\www\system/load.page.php Line: 7
File: C:\Users\Camelot\Desktop\UniServerZ\www/index.php Line: 37
Screenshot
File: C:\Users\Camelot\Desktop\UniServerZ\www\classes/player.php Line: 63
PHP:
new Error_Critic('', 'Player::save() - insert failed\nqueryUsed = ' . 'INSERT INTO ' . $this->getDatabaseHandler()->tableName(self::$table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(', ', $values) . ')');
PHP:
public function save($forceInsert = false)
{
if(!isset($this->data['id']) || $forceInsert)
{
$keys = array();
$values = array();
foreach(self::$fields as $key)
if($key != 'id')
{
$keys[] = $this->getDatabaseHandler()->fieldName($key);
$values[] = $this->getDatabaseHandler()->quote($this->data[$key]);
}
if(!$this->getDatabaseHandler()->query('INSERT INTO ' . $this->getDatabaseHandler()->tableName(self::$table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(', ', $values) . ')')){
new Error_Critic('', 'Player::save() - insert failed\nqueryUsed = ' . 'INSERT INTO ' . $this->getDatabaseHandler()->tableName(self::$table) . ' (' . implode(', ', $keys) . ') VALUES (' . implode(', ', $values) . ')');
};
$this->setID($this->getDatabaseHandler()->lastInsertId());
}
else
{
$updates = array();
foreach(self::$fields as $key)
$updates[] = $this->getDatabaseHandler()->fieldName($key) . ' = ' . $this->getDatabaseHandler()->quote($this->data[$key]);
$this->getDatabaseHandler()->query('UPDATE ' . $this->getDatabaseHandler()->tableName(self::$table) . ' SET ' . implode(', ', $updates) . ' WHERE ' . $this->getDatabaseHandler()->fieldName('id') . ' = ' . $this->getDatabaseHandler()->quote($this->data['id']));
}
}
File: C:\Users\Camelot\Desktop\UniServerZ\www\pages/accountmanagement.php Line: 1131
PHP:
$char_to_copy->save(); // now it will load 'id' of new player
PHP:
if(empty($newchar_errors))
{
// load items and skills of player before we change ID
$char_to_copy->getItems()->load();
if($newchar_sex == "0")
$char_to_copy->setLookType(136);
$char_to_copy->setID(null); // save as new character
$char_to_copy->setLastIP(0);
$char_to_copy->setLastLogin(0);
$char_to_copy->setLastLogout(0);
$char_to_copy->setName($newchar_name);
$char_to_copy->setAccount($account_logged);
$char_to_copy->setSex($newchar_sex);
$char_to_copy->setTown($newchar_town);
$char_to_copy->setPosX(0);
$char_to_copy->setPosY(0);
$char_to_copy->setPosZ(0);
$char_to_copy->setCreateIP(Visitor::getIP());
$char_to_copy->setBalance(0);
$char_to_copy->setCreateDate(time());
$char_to_copy->setSave(); // make character saveable
$char_to_copy->save(); // now it will load 'id' of new player
if($char_to_copy->isLoaded())
{
$char_to_copy->saveItems();
$main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Created</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.htmlspecialchars($newchar_name).'</b> has been created.<br/>Please select the outfit when you log in for the first time.<br/><br/><b>See you on '.$config['server']['serverName'].'!</b></td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin.";
exit;
}
File: C:\Users\Camelot\Desktop\UniServerZ\www\system/load.page.php Line: 7
PHP:
<?php
if(!defined('INITIALIZED'))
exit;
ob_start();
$main_content = '';
include("pages/" . $subtopic . ".php");
$main_content .= ob_get_clean();
File: C:\Users\Camelot\Desktop\UniServerZ\www/index.php Line: 37
PHP:
// LOAD PAGE
include_once('./system/load.page.php');
// LOAD PAGE END