[TF2] Client is not in game bug
SM logs this annoying "is not in game" error but i've put client check via userid.
Code:
L 08/11/2019 - 09:11:29: [SM] Exception reported: Client 3 is not in game Code:
public void OnPlayerSpawn(Event event, const char[] name, bool dontBroadcast) { Code:
g_iLastDeath = iNewDeath; Code:
public Action RespawnRebalanced(Handle timer, any data) { |
Re: [TF2] Client is not in game bug
Just to be clear, this is the only CreateTimer that uses the RespawnRebalanced callback?
|
Re: [TF2] Client is not in game bug
I sometimes get that error. Very rare for me, but after testing I found it to be valid. The cause for me was running code on Bots who were kicked after checking if in game but before code could completely finish executing. A human player would join the game and a bot would be kicked at just the right moment to pop that error. As I said... very rare.
|
Re: [TF2] Client is not in game bug
Quote:
|
Re: [TF2] Client is not in game bug
Quote:
|
Re: [TF2] Client is not in game bug
You have to do that :
PHP Code:
|
Re: [TF2] Client is not in game bug
But second part (IsPlayerAlive) won't execute if first part (iClient != 0) will return false...
|
Re: [TF2] Client is not in game bug
Client 0 is the world/console
|
Re: [TF2] Client is not in game bug
I know, but first part won't execute second part if [first] results to false
so this might be a bug I mean, error prints client indexes higher than 0 but these clients aren't in the game. |
Re: [TF2] Client is not in game bug
GetClientOfUserId is supposed return 0 if the userid is not valid as I understood so it should return 0 if the client is not in-game. I suggest to add IsClientInGame before IsPlayerAlive
|
All times are GMT -4. The time now is 19:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.