• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[SOLVED] Problem with create characters

tatu hunter

Insane Mind~
Joined
Jun 6, 2007
Messages
354
Reaction score
23
Location
Itaporã, Brazil
I just installed the newer rev 201, and when I go create a character the ajax keep loading forever and dont create the character.

Someone got this problem?

Thx
 
Last edited:
yes, I have samples in database.

edit....
and I have problems with ' in characters name:
Code:
An Error Was Encountered
The URI you submitted has disallowed characters.
I was using apache2.2, now I'm using Lighttpd and the problem still persist
 
This is a problem, which occurs for some users, with different server configuration, we couldn't find the problem yet.
 
I just changed the OTS_Player.php from POT to see what error it gives.

Look this error:
Code:
SQLSTATE[HY000]: General error: 1436 Thread stack overrun:  6308 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger stack.

Then to solve this problem just set "thread_stack" variable in my.cnf (linux) or my.ini (windows) to a higher value!

@PAXTON
Make a FAQ with how to solve the most popular problems.

now I want to solve the problem with ' in names =S
 
Last edited:
I did not understand how to fix :(

you can explain me??

em português de preferencia :)
 
OK its easy...

You have to configure you MySQL config, the config is my.ini if you use windows or my.cnf if you use linux, open this file and search for the variable "thread_stack" and change to a higher value (eg. 128M) or if you dont find this just put it there, restart your mysql and try again.

PT-BR
é bem fácil, vc tem que configurar o MySQL, pra isso se tem que procurar pelo arquivo my.ini se tiver usando windows ou my.cnf se tiver usando windows, abre o arquivo e muda o valor da variável "thread_stack" para um valor maior (ex. 128M) ou se vc não achar a variavel apenas crie ela e coloque um valor, depois é só reiniciar o mysql que deve funcionar.

If you use xampp (windows), go to x:/path/to/xampp/mysql/bin the file my.ini should be there.
Se você usa xampp (windows), vai em x:/caminho/para/xampp/mysql/bin o arquivo my.ini tem que estar ai.

Thx, and dont forget to rep me ok?
Obrigado, e nao esqueça de me da uma reputação vlw?
 
Then lets see what errors it returns to you.

go to root/system/application/libraries/POT/

open OTS_Player.php

find the function
PHP:
public function save() {}

and replace with this:
PHP:
public function save()
    {
        // updates existing player
		try {
        if( isset($this->data['id']) )
        {
            // UPDATE query on database
            $this->db->query('UPDATE ' . $this->db->tableName('players') . ' SET ' . $this->db->fieldName('name') . ' = ' . $this->db->quote($this->data['name']) . ', ' . $this->db->fieldName('account_id') . ' = ' . $this->data['account_id'] . ', ' . $this->db->fieldName('group_id') . ' = ' . $this->data['group_id'] . ', ' . $this->db->fieldName('sex') . ' = ' . $this->data['sex'] . ', ' . $this->db->fieldName('vocation') . ' = ' . $this->data['vocation'] . ', ' . $this->db->fieldName('experience') . ' = ' . $this->data['experience'] . ', ' . $this->db->fieldName('level') . ' = ' . $this->data['level'] . ', ' . $this->db->fieldName('maglevel') . ' = ' . $this->data['maglevel'] . ', ' . $this->db->fieldName('health') . ' = ' . $this->data['health'] . ', ' . $this->db->fieldName('healthmax') . ' = ' . $this->data['healthmax'] . ', ' . $this->db->fieldName('mana') . ' = ' . $this->data['mana'] . ', ' . $this->db->fieldName('manamax') . ' = ' . $this->data['manamax'] . ', ' . $this->db->fieldName('manaspent') . ' = ' . $this->data['manaspent'] . ', ' . $this->db->fieldName('soul') . ' = ' . $this->data['soul'] . ', ' . $this->db->fieldName('direction') . ' = ' . $this->data['direction'] . ', ' . $this->db->fieldName('lookbody') . ' = ' . $this->data['lookbody'] . ', ' . $this->db->fieldName('lookfeet') . ' = ' . $this->data['lookfeet'] . ', ' . $this->db->fieldName('lookhead') . ' = ' . $this->data['lookhead'] . ', ' . $this->db->fieldName('looklegs') . ' = ' . $this->data['looklegs'] . ', ' . $this->db->fieldName('looktype') . ' = ' . $this->data['looktype'] . ', ' . $this->db->fieldName('lookaddons') . ' = ' . $this->data['lookaddons'] . ', ' . $this->db->fieldName('posx') . ' = ' . $this->data['posx'] . ', ' . $this->db->fieldName('posy') . ' = ' . $this->data['posy'] . ', ' . $this->db->fieldName('posz') . ' = ' . $this->data['posz'] . ', ' . $this->db->fieldName('cap') . ' = ' . $this->data['cap'] . ', ' . $this->db->fieldName('lastlogin') . ' = ' . $this->data['lastlogin'] . ', ' . $this->db->fieldName('lastip') . ' = ' . $this->data['lastip'] . ', ' . $this->db->fieldName('save') . ' = ' . (int) $this->data['save'] . ', ' . $this->db->fieldName('conditions') . ' = ' . $this->db->quote($this->data['conditions']) . ', ' . $this->db->fieldName('skull') . ' = ' . $this->data['skull'] . ', ' . $this->db->fieldName('guildnick') . ' = ' . $this->db->quote($this->data['guildnick']) . ', ' . $this->db->fieldName('rank_id') . ' = ' . $this->data['rank_id'] . ', ' . $this->db->fieldName('town_id') . ' = ' . $this->data['town_id'] . ', ' . $this->db->fieldName('loss_experience') . ' = ' . $this->data['loss_experience'] . ', ' . $this->db->fieldName('loss_mana') . ' = ' . $this->data['loss_mana'] . ', ' . $this->db->fieldName('loss_skills') . ' = ' . $this->data['loss_skills'] . ', ' . $this->db->fieldName('loss_items') . ' = ' . $this->data['loss_items'] . ', ' . $this->db->fieldName('balance') . ' = ' . $this->data['balance'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']);
        }
        // creates new player
        else
        {
            // INSERT query on database
            $this->db->query('INSERT INTO ' . $this->db->tableName('players') . ' (' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('account_id') . ', ' . $this->db->fieldName('group_id') . ', ' . $this->db->fieldName('sex') . ', ' . $this->db->fieldName('vocation') . ', ' . $this->db->fieldName('experience') . ', ' . $this->db->fieldName('level') . ', ' . $this->db->fieldName('maglevel') . ', ' . $this->db->fieldName('health') . ', ' . $this->db->fieldName('healthmax') . ', ' . $this->db->fieldName('mana') . ', ' . $this->db->fieldName('manamax') . ', ' . $this->db->fieldName('manaspent') . ', ' . $this->db->fieldName('soul') . ', ' . $this->db->fieldName('direction') . ', ' . $this->db->fieldName('lookbody') . ', ' . $this->db->fieldName('lookfeet') . ', ' . $this->db->fieldName('lookhead') . ', ' . $this->db->fieldName('looklegs') . ', ' . $this->db->fieldName('looktype') . ', ' . $this->db->fieldName('lookaddons') . ', ' . $this->db->fieldName('posx') . ', ' . $this->db->fieldName('posy') . ', ' . $this->db->fieldName('posz') . ', ' . $this->db->fieldName('cap') . ', ' . $this->db->fieldName('lastlogin') . ', ' . $this->db->fieldName('lastip') . ', ' . $this->db->fieldName('save') . ', ' . $this->db->fieldName('conditions') . ', ' . $this->db->fieldName('skull') . ', ' . $this->db->fieldName('guildnick') . ', ' . $this->db->fieldName('rank_id') . ', ' . $this->db->fieldName('town_id') . ', ' . $this->db->fieldName('loss_experience') . ', ' . $this->db->fieldName('loss_mana') . ', ' . $this->db->fieldName('loss_skills') . ', ' . $this->db->fieldName('loss_items') . ', ' . $this->db->fieldName('balance') . ', ' . $this->db->fieldName('created') . ', ' . $this->db->fieldName('promotion') . ') VALUES (' . $this->db->quote($this->data['name']) . ', ' . $this->data['account_id'] . ', ' . $this->data['group_id'] . ', ' . $this->data['sex'] . ', ' . $this->data['vocation'] . ', ' . $this->data['experience'] . ', ' . $this->data['level'] . ', ' . $this->data['maglevel'] . ', ' . $this->data['health'] . ', ' . $this->data['healthmax'] . ', ' . $this->data['mana'] . ', ' . $this->data['manamax'] . ', ' . $this->data['manaspent'] . ', ' . $this->data['soul'] . ', ' . $this->data['direction'] . ', ' . $this->data['lookbody'] . ', ' . $this->data['lookfeet'] . ', ' . $this->data['lookhead'] . ', ' . $this->data['looklegs'] . ', ' . $this->data['looktype'] . ', ' . $this->data['lookaddons'] . ', ' . $this->data['posx'] . ', ' . $this->data['posy'] . ', ' . $this->data['posz'] . ', ' . $this->data['cap'] . ', ' . $this->data['lastlogin'] . ', ' . $this->data['lastip'] . ', ' . (int) $this->data['save'] . ', ' . $this->db->quote($this->data['conditions']) . ', ' . $this->data['skull'] . ', ' . $this->db->quote($this->data['guildnick']) . ', ' . $this->data['rank_id'] . ', ' . $this->data['town_id'] . ', ' . $this->data['loss_experience'] . ', ' . $this->data['loss_mana'] . ', ' . $this->data['loss_skills'] . ', ' . $this->data['loss_items'] . ', ' . $this->data['balance'] . ', ' . time() . ', ' . $this->data['promotion'] . ')');
            // ID of new group
            $this->data['id'] = $this->db->lastInsertId();
        }

        // updates skills - doesn't matter if we have just created character - trigger inserts new skills
        foreach($this->skills as $id => $skill)
        {
            $this->db->query('UPDATE ' . $this->db->tableName('player_skills') . ' SET ' . $this->db->fieldName('value') . ' = ' . $skill['value'] . ', ' . $this->db->fieldName('count') . ' = ' . $skill['tries'] . ' WHERE ' . $this->db->fieldName('player_id') . ' = ' . $this->data['id'] . ' AND ' . $this->db->fieldName('skillid') . ' = ' . $id);
        }
		}catch(PDOException $e) {
			print_r($e->getMessage());
		}
    }

try again and see the error, post it here, and I try to help you.
 
Firebug will shows you what's wrong, he will get the response from AJAX. Probably no samples characters.
 
OK its easy...

You have to configure you MySQL config, the config is my.ini if you use windows or my.cnf if you use linux, open this file and search for the variable "thread_stack" and change to a higher value (eg. 128M) or if you dont find this just put it there, restart your mysql and try again.

PT-BR
é bem fácil, vc tem que configurar o MySQL, pra isso se tem que procurar pelo arquivo my.ini se tiver usando windows ou my.cnf se tiver usando windows, abre o arquivo e muda o valor da variável "thread_stack" para um valor maior (ex. 128M) ou se vc não achar a variavel apenas crie ela e coloque um valor, depois é só reiniciar o mysql que deve funcionar.

If you use xampp (windows), go to x:/path/to/xampp/mysql/bin the file my.ini should be there.
Se você usa xampp (windows), vai em x:/caminho/para/xampp/mysql/bin o arquivo my.ini tem que estar ai.

Thx, and dont forget to rep me ok?
Obrigado, e nao esqueça de me da uma reputação vlw?

eu não entendi nada, poderia explicar melhor
I do not understand anything, u can explain better :)


Firebug will shows you what's wrong, he will get the response from AJAX. Probably no samples characters.

i have the sample :(
- fixed only when I reinstall the modern <_<
 
Fix the problem:

Where:
/*Names of vocations as in database as samples. First key is world id and second vocation id.*/
$config['newchar_vocations'][0][15] = "Rook Sample";
$config['newchar_vocations'][0][16] = "Sorcerer Sample";
$config['newchar_vocations'][0][17] = "Druid Sample";
$config['newchar_vocations'][0][18] = "Paladin Sample";
$config['newchar_vocations'][0][19] = "Knight Sample";
$config['newchar_vocations'][1][15] = "Rook Sample";
$config['newchar_vocations'][1][16] = "Sorcerer Sample";
$config['newchar_vocations'][1][17] = "Druid Sample";
$config['newchar_vocations'][1][18] = "Paladin Sample";
$config['newchar_vocations'][1][19] = "Knight Sample";

Change for this:
/*Names of vocations as in database as samples. First key is world id and second vocation id.*/
$config['newchar_vocations'][0][0] = "Rook Sample";
$config['newchar_vocations'][0][1] = "Sorcerer Sample";
$config['newchar_vocations'][0][2] = "Druid Sample";
$config['newchar_vocations'][0][3] = "Paladin Sample";
$config['newchar_vocations'][0][4] = "Knight Sample";
$config['newchar_vocations'][1][0] = "Rook Sample";
$config['newchar_vocations'][1][1] = "Sorcerer Sample";
$config['newchar_vocations'][1][2] = "Druid Sample";
$config['newchar_vocations'][1][3] = "Paladin Sample";
$config['newchar_vocations'][1][4] = "Knight Sample";


:)
 
Back
Top