Timers..
#1

Hi, I made 2 timers for reaction tests, It works without any bugs but the problem is, after 7-8 hours of starting the timer, it gets bugged and i have to restart gamemode or restart server, thats sucks so, i tried to make command to fix the timers when they got bugged, but it doesn't do anything. the timers still being bugged after i use the command
Heres the command
PHP код:
dcmd_rt(playeridparams[])
{
    
#pragma unused params
    
ResetTimers();
    
SendClientMessage(playeridCOLOR_AQUA"SERVER: Timers resetted.");
    return 
1;
}
ResetTimers()
{
    
KillTimer(xReactionTimer);
    
KillTimer(gRandomMessageTimer);
    
xReactionTimer SetTimer("xReactionTest"TIME1);
    
gRandomMessageTimer SetTimer("OnRandomMessageChange"360000true);
    return 
1;

It returns "SERVER: Timers resetted" but infact, it didn't.
However, heres the code on gamemodeinit:-
PHP код:
    xReactionTimer SetTimer("xReactionTest"TIME1);
    
gRandomMessageTimer SetTimer("OnRandomMessageChange"360000true); 
Anyway to fix this?
Reply
#2

can you show us xReactionTest, OnRandomMessageChange callbacks
Reply
#3

I somehow feel that this bug relates to your VPS or something..
Reply
#4

:/ Idk what the hell is that, its server hosted by ultra h, paid server
Reply
#5

Most likely your server is running out of resources after a while (7-8 hours) and the timers don't get executed. Try monitoring your resource usage when you have 7-8 hours uptime and see if the CPU or the RAM are being exhausted.
Reply
#6

the timer gets executed but the problem is, it spams the chat with reaction tests
like 17-18 reaction every 13-14 seconds, :/
I believe its something in timer intervals
Reply
#7

bump
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)