View Single Post
Author Message
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhattan
Old 07-12-2015 , 08:00   [TF2] Problem with closehandle
Reply With Quote #1

I have problem closing a handle that errors out
Log:
Code:
L 07/12/2015 - 13:55:42: [SM] Native "CloseHandle" reported: Handle 6b113027 is invalid (error 3)
L 07/12/2015 - 13:55:42: [SM] Displaying call stack trace for plugin "bwr2.smx":
L 07/12/2015 - 13:55:42: [SM]   [0]  Line 6504, D:\TF2Server\server\tf\addons\sourcemod\scripting\bwr2.sp::OnEntityDestroyed()
Closing code:

PHP Code:
        if(ObjTimer[obj] != INVALID_HANDLE)
        {
            
CloseHandle(ObjTimer[obj]);
            
ObjTimer[obj] = INVALID_HANDLE;  
        } 
Handle's timer:
PHP Code:
ObjTimer[obj] = CreateTimer(0.1,NewGlow,obj,TIMER_REPEAT); 
Anyone know how I can solve this problem?

PS I can't use return Plugin_Stop in OnEntityDestroyed() cos it disallow me to write to it Action:
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline