SA-MP Forums Archive
[HELP] Kill timer 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Kill timer Error. (/showthread.php?tid=122093)



[HELP] Kill timer Error. - CuervO - 20.01.2010

I got:

pawn Код:
C:\Rockstar Games\GTA San Andreas\ser 0.3\gamemodes\larp.pwn(8718) : error 076: syntax error in the expression, or invalid function call

The line is:

pawn Код:
KillTimer(speedou);

I cannot understand the reason of this, please, could anyone explain me?

This is the Forward
pawn Код:
forward speedou(playerid);
And this is the Function
pawn Код:
public speedou(playerid)
{
    TextDrawDestroy(Speedo);
    return 1;
}
And this is where i use it
pawn Код:
SetTimerEx("speedou", 1000, false, "i", i);


Thanks in Advance.


Re: [HELP] Kill timer Error. - [HiC]TheKiller - 20.01.2010

pawn Код:
new Timer;

KillTimer(Timer);

forward speedou(playerid);

public speedou(playerid)
{
    TextDrawDestroy(Speedo);
    return 1;
}

Timer = SetTimerEx("speedou", 1000, false, "i", i);



Re: [HELP] Kill timer Error. - Calgon - 20.01.2010

"syntax error in the expression, or invalid function call"

was triggered because you tried to destroy a public, not the timer (the timer ID is saved in the variable that HiC has provided in his example).


Re: [HELP] Kill timer Error. - CuervO - 20.01.2010

Very Thank you