View Single Post
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-06-2021 , 05:24   Re: [L4D2] ZSpawn: Zombie Spawn manager (v1.1)[05-May-2021]
Reply With Quote #11

You should be setting the timer handle to null in the timer callback if you're closing the timer, which you do in the first two lines of the timer callback code. See the [TUT] SourcePawn Scripting - Tips, Basics to Advanced thread for details on dealing with timer handles and ways to use them without issues. You can call "delete g_hSpawnTimer" multiple times since delete closes the timer if it's a valid handle and sets g_hSpawnTimer to null.


Edit: You're also leaking ray trace handles by never deleting them:

Quote:
TR_TraceRayFilterEx
Return Value

Ray trace handle, which must be closed via CloseHandle() or delete.

Also couple spelling mistakes (just pointing out to help you):

succefully > successfully
oposite > opposite
wich > which
commads > commands
Minium > Minimum
__________________

Last edited by Silvers; 05-06-2021 at 05:33.
Silvers is offline