This crash's 100% of the time, and I'm not entirely sure why. I believe I've included all the related code below. All I'm attempting to do is kill the timer which would call the Humans win callback, but if all humans die prior to the time expiring then the timer needs to be killed.
PHP Code:
//Global Array
Handle g_hTimer;
//RoundStart callback
float delay = 1.0 * GetConVarInt(g_cvRoundTime) * 60 - 2;
g_hTimer = CreateTimer(delay, Timer_HumansWinEvent, _, TIMER_FLAG_NO_MAPCHANGE);
//RoundEnd callback (KillTimer is the error line)
if(g_hTimer != INVALID_HANDLE)
{
KillTimer(g_hTimer);
g_hTimer = INVALID_HANDLE;
}
//Error
L 11/11/2020 - 15:22:01: [SM] Exception reported: Invalid timer handle 686100fc (error 1)
L 11/11/2020 - 15:22:01: [SM] Blaming: cZomRevamp3.smx
L 11/11/2020 - 15:22:01: [SM] Call stack trace:
L 11/11/2020 - 15:22:01: [SM] [0] KillTimer
Edit - Shouldn't need to add this here, but the game only crash's on RoundEnd when KillTimer is called. Otherwise no issues (that I've noticed).