Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal DB error when creating a character #26

Closed
Selektiv opened this issue Oct 24, 2017 · 3 comments
Closed

Fatal DB error when creating a character #26

Selektiv opened this issue Oct 24, 2017 · 3 comments
Labels

Comments

@Selektiv
Copy link

Selektiv commented Oct 24, 2017

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1364 Field 'rank_id' doesn't have a default value' in /opt/lampp/htdocs/tibia/system/libs/pot/OTS_Base_DB.php:101 Stack trace: #0 /opt/lampp/htdocs/tibia/system/libs/pot/OTS_Base_DB.php(101): PDO->query('INSERT INTO pl...') #1 /opt/lampp/htdocs/tibia/system/libs/pot/OTS_Player.php(450): OTS_Base_DB->query('INSERT INTO pl...') #2 /opt/lampp/htdocs/tibia/system/pages/account/create_character.php(155): OTS_Player->save() #3 /opt/lampp/htdocs/tibia/system/pages/accountmanagement.php(128): require('/opt/lampp/htdo...') #4 /opt/lampp/htdocs/tibia/index.php(340): require('/opt/lampp/htdo...') #5 {main} thrown in /opt/lampp/htdocs/tibia/system/libs/pot/OTS_Base_DB.php on line 101

@Selektiv
Copy link
Author

Running Ubuntu 16.x
OTHire
LAMPP/XAMPP
MySQL

@slawkens
Copy link
Owner

slawkens commented Oct 25, 2017

Go to phpmyadmin, select your database and execute this:

ALTER TABLE players MODIFY `rank_id` int(11) NOT NULL DEFAULT 0  COMMENT 'only if you use __OLD_GUILD_SYSTEM__';
ALTER TABLE players MODIFY `guildnick` varchar(255) NOT NULL DEFAULT '' COMMENT 'only if you use __OLD_GUILD_SYSTEM__'

Also, if you didn't compile with OLD_GUILD_SYSTEM, then you can remove those fields in players table: rank_id and guildnick.

@slawkens
Copy link
Owner

slawkens commented Jan 7, 2018

This has been fixed. Closing now.

@slawkens slawkens closed this as completed Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants