• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

TFS 1.X+ tfs 1.3 bug, player deleted when died?? 'Error while saving player: Dominic'

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,096
Solutions
34
Reaction score
184
1) A player died, and i see this error on log, and player was deleted, how i can solve it:
Rich (BB code):
[Error - mysql_real_query] Query: INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (990, 1612145014, 455, 'Heyron Hyu', 1, 'Heyron Hyu', 1, 1, 0)
Message: Cannot add or update a child row: a foreign key constraint fails (`server`.`player_deaths`, CONSTRAINT `player_deaths_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE)
Dominic has logged out.
Error while saving player: Dominic

2) another player simply logged out, and was also deleted
Code:
Pohuji has logged out.
Error while saving player: Pohuji

happens randomly?
 
Last edited:

kay

Legendary OT User
Joined
Apr 23, 2013
Messages
1,046
Solutions
11
Reaction score
1,488
Location
32316,31942,7
YouTube
TibiantisOnline
The first error is because you're trying to insert into column player_id in table player_deaths a value that does not exist in column id in table players.
Invalid (non existant) player's id, in other words.
 
Top