[HELP] KillTimer -
admantis - 09.12.2010
I have a errror with KillTimer.. I need to fix it urgently.
This is the code..
Code:
KillTimer(JobCash);
And error..
Code:
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3b\Server 0.3b\gamemodes\fierroharb_retardjob.pwn(1418) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Its only that line, the rest everything working :l
It's urgent please help.. :l
Re: [HELP] KillTimer - rjjj - 09.12.2010
Check if the SetTimer variable is like:
pawn Code:
synctimer = SetTimer("SyncUp", 5000, 1); //SyncyUp is a callback (public)
If yes, you can use KillTimer like this:
If not, put your JobCash settimer here in the topic.
I hope that i have helped
Re: [HELP] KillTimer -
admantis - 09.12.2010
Not working :S Its urgent, here is my script
Up of all..
Code:
forward JobCash(playerid);
In a callback..
Code:
JobCash = SetTimerEx("CashJob",5000,true,"i",playerid);
In another callback
Code:
KillTimer(JobCash); // Here is the error
Re: [HELP] KillTimer -
Lynn - 09.12.2010
pawn Code:
forward JobCash();
public JobCash()
{
Info......
return 1;
}
Only use (playerid); If public JobCash, involves "SomeThingHere(Playerid);"
Re: [HELP] KillTimer -
admantis - 09.12.2010
Code:
public JobCash(playerid)
{
Cashout[playerid] = -100;
return 1;
}
(playerid) is involved...
Re: [HELP] KillTimer - rjjj - 09.12.2010
kkkkkkkkk hey dude, look at this:
Code:
JobCash = SetTimerEx("CashJob",5000,true,"i",playerid);
public JobCash(playerid)
{
Cashout[playerid] = -100;
return 1;
}
Can you see the problem ?
Re: [HELP] KillTimer -
admantis - 09.12.2010
There is no error... i just show you its using playerid
The error is at
KillTimer(JobCash);
Re: [HELP] KillTimer -
Lynn - 09.12.2010
His point is, you have CashJob, and JobCash.
They need to be the same(I didn't even notice that mistake xD)
Re: [HELP] KillTimer - rjjj - 09.12.2010
Sorry for the joke man, look:
CashJob = The name of the public function.
JobCash = The name of the settimer variable.
Code:
JobCash = SetTimerEx("CashJob",5000,true,"i",playerid);
So, you put
JobCash like public function, but
JobCash is the name of the settimer variable ! The name of public function is
CashJob xD
To solve your problem, use it:
pawn Code:
KillTimer(JobCash);
JobCash = SetTimerEx("CashJob",5000,true,"i",playerid);
forward CashJob(playerid);
public CashJob(playerid)
{
Cashout[playerid] = -100;
return 1;
}
Sorry, i hope that i have helped
Re: [HELP] KillTimer -
admantis - 09.12.2010
FIXED!! Thank you very much!!!