• 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!

Windows ots tfs acc maker error

szperus

New Member
Joined
Nov 2, 2009
Messages
1
Reaction score
0
hello

i have question.

I want to make a OTS but when I make acc maker by gęsior I do all. and i have problem because if i'm login for any account i've got an error.

Fatal error: Call to a member function fetch() on a non-object in C:\xampp\htdocs\pot\OTS_Player.php on line 66

can anyone help me?

I dont speak english perfekt. sorry for errors
 
And now i restarted the server and that error changed to:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-0' for key 'player_id'' in C:\xampp\htdocs\pot\OTS_Player.php:187 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(187): PDO->query('INSERT INTO `pl...') #1 C:\xampp\htdocs\accountmanagement.php(952): OTS_Player->save() #2 C:\xampp\htdocs\index.php(135): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 187
 
http://www.speedy*****malware.localhost/files/21314847/accountmanagement.php
http://www.speedy*****malware.localhost/files/21314865/OTS_Player.php

There you have, but please help me to fix that :(
 
I dont know if it have something with it, but i didnt use a new database , i used a imported one. And for samples i added its manually.
 
As in code say, it is trying to insert the player id in one that already have that id.

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-0' for key 'player_id'' in C:\xampp\htdocs\pot\OTS_Player.php:187 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(187): PDO->query('INSERT INTO `pl...') #1 C:\xampp\htdocs\accountmanagement.php(952): OTS_Player->save() #2 C:\xampp\htdocs\index.php(135): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 187
 
Dont did any difference.
As many hours trying a lot of things i founf finally the problem.
The insert function start at players id 0
And i have another registries on that , so i you could me say where i can edit the value to something like 200.

Look this especific lines
PHP:
        // 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();

In last line is last inserted ip, that mean in account managemente is something that start the value on regitry of database = 0, if i find it and change it to another higher it will be solved i think.
 
Last edited:
Another test i did and i make that one char got created but when i tried the second the same error appeared, it seem that all characters that php send to create, send to the player_id 0 and dont change to another value neither check available player_id.
 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1017 Can't find file: 'proc' (errno: 2)' in C:\xampp\htdocs\pot\OTS_Player.php:187 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(187): PDO->query('INSERT INTO `pl...') #1 C:\xampp\htdocs\accountmanagement.php(952): OTS_Player->save() #2 C:\xampp\htdocs\index.php(143): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 187


please help
 
help me


Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1017 Can't find file: 'proc' (errno: 2)' in C:\xampp\htdocs\pot\OTS_Player.php:187 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(187): PDO->query('INSERT INTO `pl...') #1 C:\xampp\htdocs\accountmanagement.php(952): OTS_Player->save() #2 C:\xampp\htdocs\index.php(143): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 187
 
Back
Top