Stopping a non-repeatable timer
Hi,
How do I correctly stop a non-repeatable timer? I made it a separate handle and named it gH_WeapRespawn and tried this on each event I want it to stop: PHP Code:
PHP Code:
Is that due to it being the wrong way or is it most likely something else in my code, perhaps? I know this is the way to stop repeatable timers, but does it work the same for non-repeatable? |
Re: Stopping a non-repeatable timer
Just do delete gH_WeapRespawn; instead of KillTimer. Or set gH_WeapRespawn to null after KillTimer.
|
Re: Stopping a non-repeatable timer
Quote:
If it's the same I guess I'll use delete instead, just for the fact that I won't have to add more lines :3 |
Re: Stopping a non-repeatable timer
Quote:
|
Re: Stopping a non-repeatable timer
delete should set to null after freeing memory anyway, so I would go with that.
|
Re: Stopping a non-repeatable timer
Quote:
|
All times are GMT -4. The time now is 08:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.