You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.
DP/GameEventHandler.cs ~line 140 (event "player_disconnect")
Got out of index exception on parser.Players[(int)data["userid"]].Disconnected = true;, fixed by making sure the index is valid: if(parser.Players.ContainsKey ((int)data ["userid"]))
The text was updated successfully, but these errors were encountered:
romain-durban
changed the title
Accessing unexisting parser.Player
Accessing unexisting parser.Players
Nov 26, 2014
I think it happens because of bots joining the game before the demo starts (Matchmaking) and then do not produce connection event in the parser. The error indeed occurs on a bot being kicked by console.
I'll send the demo, but this should actually happen for all MM demos downloaded from the server.
Since this check is done only on 'disconnect' events, it's not really expensive, all the more it's a dictionary key check.
DP/GameEventHandler.cs ~line 140 (event "player_disconnect")
Got out of index exception on
parser.Players[(int)data["userid"]].Disconnected = true;
, fixed by making sure the index is valid:if(parser.Players.ContainsKey ((int)data ["userid"]))
The text was updated successfully, but these errors were encountered: