Hello,
I have a problem.
Code:
L 01/06/2018 - 00:05:48: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:05:48: [SM] Invalid timer handle bc90ca4 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:05:48: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:05:48: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:05:48: [SM] Invalid timer handle bd40c5f (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:05:48: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:05:48: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:05:48: [SM] Invalid timer handle bd50cc4 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:05:48: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:07: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:07: [SM] Invalid timer handle fcf0ccb (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:07: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:09: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:09: [SM] Invalid timer handle 10930c9a (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:09: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:10: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:10: [SM] Invalid timer handle 10db0c90 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:10: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:12: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:12: [SM] Invalid timer handle 11140c90 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:12: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:12: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:12: [SM] Invalid timer handle 11280c8f (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:12: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:13: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:13: [SM] Invalid timer handle 11610c8f (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:13: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:38: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:38: [SM] Invalid timer handle 1ad20c90 (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:38: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
L 01/06/2018 - 00:06:40: [SM] Plugin "csgo_tbm.smx" encountered error 23: Native detected error
L 01/06/2018 - 00:06:40: [SM] Invalid timer handle 1be40c3d (error 3) during timer end, displayed function is timer callback, not the stack trace
L 01/06/2018 - 00:06:40: [SM] Unable to call function "ShowTeamPanel" due to above error(s).
Code
PHP Code:
public Action CommandJoinTeam(int client, const char[] command, int argc) {
if(PluginCvar(ECEnabled).handle.BoolValue == false || PluginCvar(ECLimitJoin).handle.BoolValue == false)
return Plugin_Continue;
if(g_Players[client][EPIsBot])
return Plugin_Continue;
if(PluginCvar(ECImmunityJoin).handle.BoolValue == true && (GetUserFlagBits(client) & PluginCvar(ECImmunityFlags).handle.Flags))
return Plugin_Continue;
if(PluginCvar(ECLimitAfter).handle.IntValue > 0) {
if(g_Wart[iRoundNumber] <= PluginCvar(ECLimitAfter).handle.IntValue)
return Plugin_Continue;
}
GetCountPlayersInTeams();
if(g_Teams[CS_TEAM_T][ETSize]+g_Teams[CS_TEAM_CT][ETSize] < PluginCvar(ECLimitMin).handle.IntValue)
return Plugin_Continue;
char text[32];
if(GetCmdArgString(text, sizeof(text)) < 1)
return Plugin_Continue;
int startidx = 0;
if(text[strlen(text)-1] == '"') {
text[strlen(text)-1] = '\0';
startidx = 1;
}
int iNewTeam = StringToInt(text[startidx]);
int iOldTeam = g_Players[client][EPTeam];
if(iNewTeam == iOldTeam) {
TBMPrintToChat(client, "%t", "Join the same team");
TBMShowTeamPanel(client);
return Plugin_Handled;
}
if(iNewTeam < CS_TEAM_T)
return Plugin_Continue;
if(view(float, g_Players[client][EPBlockTransfer]) > GetEngineTime() && iOldTeam >= CS_TEAM_T) {
TBMPrintToChat(client, "%t", "Stay team");
TBMShowTeamPanel(client);
return Plugin_Handled;
}
if(PluginCvar(ECMaxSize).handle.IntValue > 0) {
if(g_Teams[iNewTeam][ETSize] >= PluginCvar(ECMaxSize).handle.IntValue) {
TBMPrintToChat(client, "%t", "Max size join");
TBMShowTeamPanel(client);
return Plugin_Handled;
}
}
else if(g_Teams[iNewTeam][ETSize] >= MaxClients / 2 + IntMax(PluginCvar(ECMaxDiff).handle.IntValue, 1)) {
TBMPrintToChat(client, "%t", "Max size join");
TBMShowTeamPanel(client);
return Plugin_Handled;
}
int iOpTeam = (iNewTeam == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T;
if(g_Teams[iNewTeam][ETSize]-g_Teams[iOpTeam][ETSize] >= PluginCvar(ECMaxDiff).handle.IntValue) {
TBMPrintToChat(client, "%t", "Max diff join");
TBMShowTeamPanel(client);
return Plugin_Handled;
}
return Plugin_Continue;
}
void TBMShowTeamPanel(int client) {
if(g_Players[client][EPPanelTimer] != INVALID_HANDLE) CloseHandle(g_Players[client][EPPanelTimer]);
g_Players[client][EPPanelTimer] = CreateTimer(0.8, ShowTeamPanel, GetClientSerial(client),TIMER_REPEAT);
}
public Action ShowTeamPanel(Handle timer, any serial) {
int client = GetClientFromSerial(serial);
if(client == 0 || g_Players[client][EPIsConnected] == false || g_Players[client][EPIsBot] == true || IsClientInGame(client) == false)
{
CloseHandle(g_Players[client][EPPanelTimer]);
g_Players[client][EPPanelTimer] = INVALID_HANDLE;
return Plugin_Stop;
}
CloseHandle(g_Players[client][EPPanelTimer]);
g_Players[client][EPPanelTimer] = INVALID_HANDLE;
ShowVGUIPanel(client, "team");
return Plugin_Stop;
}
How to fix?