Error - 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 (
/showthread.php?tid=315029)
Error -
nuriel8833 - 01.02.2012
Hello
I get this error:
pawn Код:
error 076: syntax error in the expression, or invalid function call
In this code:
pawn Код:
forward CountDown();
public CountDown() {
CountDownVar--;
new str[128];
if(CountDownVar == 0) {
for(new i=0;i<75;i++) {
GameTextForAll("~g~Go!",1500,6);
TogglePlayerControllable(i,1);
KillTimer(CountDown); } } //Line of error
else {
format(str, sizeof(str), "~r~%d",CountDownVar);
GameTextForAll(str,1001,6); }
PlayerPlaySoundToAll(1056);
return 1;
}
Please help
Thanks,Nuriel
Re: Error -
[Diablo] - 01.02.2012
hm.. i have replicated your code and got the same error, however, commenting out
did get rid of the error. post the timer setup part..
Re: Error -
nuriel8833 - 01.02.2012
Quote:
Originally Posted by [Diablo]
hm.. i have replicated your code and got the same error, however, commenting out did get rid of the error. post the timer setup part..
|
What do you mean?
pawn Код:
SetTimer("CountDown",1000, false);
this?
Re: Error - T0pAz - 01.02.2012
Quote:
Originally Posted by nuriel8833
What do you mean?
pawn Код:
SetTimer("CountDown",1000, false);
this?
|
KillTimer() takes
timer object as it's argument, not
callback.
See
this.
Re: Error -
nuriel8833 - 01.02.2012
Quote:
Originally Posted by T0pAz
KillTimer() takes timer object as it's argument, not callback.
See this.
|
Fixed,thanks a lot