Filterscript Timers crashing the server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Filterscript Timers crashing the server (
/showthread.php?tid=347185)
Filterscript Timers crashing the server -
Elorreli - 31.05.2012
Well, for some reason when I add a timer to a filterscript it crashes the server when the filterscript is being unloaded.
So if I for example
pawn Код:
Timer[playerid] = SetTimerEx("CoolDown", 1000, false, "i", playerid);
It still crashes the server even if I kill it OnFilterScriptExit, can't seem the cause.
pawn Код:
public OnFilterScriptExit()
{
for(new i = 0; i < 32; i++)
{
KillTimer(Timer[i]);
}
return 1;
}
Anyone experienced this issue before?
Re: Filterscript Timers crashing the server -
ViniBorn - 31.05.2012
You do not need to destroy timers when turn off the server / FS
Re: Filterscript Timers crashing the server -
Elorreli - 31.05.2012
Quote:
Originally Posted by Viniborn
You do not need to destroy timers when turn off the server / FS
|
I've also tried to not destroy them and it still crashes.
Re: Filterscript Timers crashing the server -
ViniBorn - 31.05.2012
The problem wouldn't be in 'OnFilterScriptInit' or in 'CoolDown'?
Re: Filterscript Timers crashing the server -
ikey07 - 01.06.2012
You should kill timer only for players for who its started, also dont use 32, use MAX_PLAYERS at killing and check if they are connected when your FS exists