[HELP] Kill timer Error.
#1

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.
Reply
#2

pawn Код:
new Timer;

KillTimer(Timer);

forward speedou(playerid);

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

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

"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).
Reply
#4

Very Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)