Filterscript Timers crashing the server
#1

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?
Reply
#2

You do not need to destroy timers when turn off the server / FS
Reply
#3

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.
Reply
#4

The problem wouldn't be in 'OnFilterScriptInit' or in 'CoolDown'?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)