View Single Post
Author Message
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 11-12-2020 , 13:48   Invalid Timer Handle crash
Reply With Quote #1

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(delayTimer_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: [SMException reportedInvalid timer handle 686100fc (error 1)
L 11/11/2020 15:22:01: [SMBlamingcZomRevamp3.smx
L 11
/11/2020 15:22:01: [SMCall stack trace:
L 11/11/2020 15:22:01: [SM]   [0KillTimer 

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).

Last edited by Halt; 11-12-2020 at 13:51.
Halt is offline