SA-MP Forums Archive
Problem with timer in linux 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: Problem with timer in linux server (/showthread.php?tid=424519)



Problem with timer in linux server - NeyMar96 - 22.03.2013

I have this timer:
PHP код:
public OnGameModeInit()
{
SetTimer("OnUpdateEx",1000,true);
}
forward OnUpdateEx();
public 
OnUpdateEx()
{
foreach(
Playeri)
{
SendClientMessage(i,COLOR_YELLOW,"Hi");
}

and this not send message to players. this work in windows server but in linux this is not work


Re: Problem with timer in linux server - LarzI - 22.03.2013

Have you tried with a normal for-loop? I'm not saying it is, but foreach might be bugged on Linux platform, as I can't find any faulty stuff with your code.