TroubleInTerroristTown / Public

The game is about a group of "terrorists" who have traitors among them, out to kill everyone who's not a traitor.
https://forums.alliedmods.net/showthread.php?p=2357981
GNU General Public License v3.0
93 stars 38 forks source link

Preemptive fixes for out of range victim and attacker id's #480 #484

Closed c0rp3n closed 4 years ago

c0rp3n commented 4 years ago

Not yet been able to replicate the error but added some extra logging to see where it is going wrong also made the ttt player id unsigned though it shouldn't matter.

L 08/23/2020 - 10:03:25: [ttt/ttt_rdm.smx] DbCallback_InsertDeath: Out of range value for column 'victim_id' at row 1

This error generally means the value is out of range, so would seem that TTT_GetPlayerID is returning -1 or something or other, which is the cause of the problem, shall try reproducing on a local server again.

We may need to validate Player ID's in SQL_OnClientPutInServer incase -1 is returned. To also look to fix this I have made the ttt tables id column be unsigned to match that of RDM but noone should really be having that many players in there database anyway.