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



error (SetTimer) - NeroX98 - 20.04.2012

I have a error:

Код:
D:\PC Igri\GTA\GTA San Andreas\Crime City RPG Macedonia\gamemodes\CCRP.pwn(3940) : error 076: syntax error in the expression, or invalid function call
Code:
Код:
new CekaBolnica[MAX_PLAYERS];
forward Bolnica(playerid);


Under OnPlayerDeath:

SetPlayerPos(playerid, Vasi Koordinati kade da se ragja);
SetTimer(Bolnica, 60000, false);
CekaBolnica[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Tesko Ste Povredeni i Ke bidnete prefrleni vo Bolnica");



On the end of the script:

public Bolnica(playerid)
{
ClearAnimation(playerid);
CekaBolnica[playerid] = 0;
SendClientMessage(playerid, COLOR_RED, "Pusteni ste Od bolnica!");
return 1;
}



in command exit:

if(CekaBolnica[playerid] == 1) return SendClientMessage(playerid,-1,"Seuste Ste Bolni i nemozete da izlezete");
LINE 3940:

Код:
SetTimer(Bolnica, 60000, false);



Re: error (SetTimer) - [MG]Dimi - 20.04.2012

when you have params you mus use SetTimerEx
pawn Код:
SetTimerEx("Bolnica", 60000, false,"d",playerid);
And callback must be inside " "