SA-MP Forums Archive
SetTimer bug - 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: SetTimer bug (/showthread.php?tid=662367)



SetTimer bug - Disaster97 - 30.12.2018

public OnGameModeInit()
Quote:

SetTimer("PlayerOnServerEx", 1000, true);
SetTimer("PlayerOnServer60", 1000, true);

In this collbacks i add printf

server_log.txt
Quote:

PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServerEx
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServerEx
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60
PlayerOnServer60

PlayerOnServer60 works fine but PlayerOnServerEx 29-30 times behind.

Timer that doesn't work correctly always has id 11.
Quote:

new TimerID;
TimerID = SetTimer("PlayerOnServerEx", 1000, true);
printf("TimerID = %d", TimerID);

And server_log.txt says
Quote:

TimerID = 11

if i swap them in my gamemode, then the problems will be with the PlayerOnServer60.
I only update streamer plugin, but when I put the old version, everything remains the same!