SA-MP Forums Archive
Timer problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Timer problem (/showthread.php?tid=177637)



Timer problem - FireCat - 18.09.2010

help here i get this stupid error xD
Quote:

C:\Users\james\Desktop\server2\gamemodes\gamemode. pwn(506) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.

code
Код:
public daytime()
{
    SetPlayerTime(playerid,12,0); //noon
}



Re: Timer problem - Sniperwolves - 18.09.2010

your function doesn't contain "playerid"
if you want to set the weather for all player use this:

Код:
public daytime()
{
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
       if(IsPlayerConnected(i))
       {
          SetPlayerTime(i,12,0); //noon
       }
    }
}