• 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,188
Solutions
34
Reaction score
200
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:
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.
 
Back
Top