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

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,094
Solutions
33
Reaction score
182
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
872
Solutions
10
Reaction score
1,131
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