SA-MP Forums Archive
[HELP] Eror - 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] Eror (/showthread.php?tid=264530)



[HELP] Eror - TeRmi[N]aTor - 26.06.2011

Hello ... I Have This Eror :
Код HTML:
C:\Users\Eyal\Desktop\PDM\Mode\PDM\gamemodes\GoodMode.pwn(4381) : error 035: argument type mismatch (argument 1)
in this command :
Код HTML:
dcmd_kcd(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 1)
{
if(CdStated == 1)
{
KillTimer("cd",1000,3);
return 1;
}
else return SendClientMessage(playerid,red,"ERROR: No Cd Runing !!");
}
else return ErrorMessages(playerid, 1);
}
the eror in this line :
Код HTML:
KillTimer("cd",1000,3);
can any one fix it ?


Re: [HELP] Eror - iPLEOMAX - 26.06.2011

To use KillTimer, you have to create a new timer first.

Example:

pawn Код:
//At the top of your script.
new MyTimer;

//When you want to start your timer..
MyTimer = SetTimer("function", 5000, true);

//Somewhere in your cmd or when you want to stop the timer..
KillTimer(MyTimer);
Learn more about timers here:
SetTimer
KillTimer


Re: [HELP] Eror - TeRmi[N]aTor - 26.06.2011

ok , tnx ...
ן need to do :
Код HTML:
KillTimer(cd_timer);
no :
Код HTML:
KillTimer("cd_timer",1000,3);