Killing Timer Problem
#1

Hi community,
I got this error in the following code (error 076: syntax error in the expression, or invalid function call)
Код:
KillTimer(ProgressBar);
Whole code : [ProgressBar function]
Код:
public ProgressBar()
{
    foreach(Player,playerid)
    {
		SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid])-10);
		UpdateProgressBar(hungry[playerid], playerid);
		if(GetProgressBarValue(hungry[playerid]) <= 0)
		{
	   		SetTimer("HungryTime", 10000, 1);
	   		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Shoma alan gorosne hastid, lotfan ghaza bokhorid. agar nakhorid HP az dast midahid!");
            SetProgressBarValue(hungry[playerid], 0);
            KillTimer(ProgressBar); // Here's the problem
		}
	}
	return 1;
}
+Rep for best answer.
Reply
#2

Click Here
Reply
#3

name your timer like:
PHP код:
new mytimer
set your timer:
PHP код:
mytimer SetTimer(....); 
then kill it by:
PHP код:
KillTimer(mytimer); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)