when i try to kill a timer i get errors? - 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: when i try to kill a timer i get errors? (
/showthread.php?tid=158491)
when i try to kill a timer i get errors? -
Kar - 10.07.2010
pawn Код:
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAN~1.pwn(1912) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: when i try to kill a timer i get errors? -
VirSpectorX - 10.07.2010
Can i see the script please.
Re: when i try to kill a timer i get errors? -
BP13 - 10.07.2010
for your timer do it like this:
pawn Код:
new timer; //define timer
public OnGameModeInit()
{
timer = SetTimer(bla, 3000, true); //Setting the timer for bla but defined as timer.
return 1;
}
public bla() //What the timer does
{
return 1;
}
public Whatever()
{
KillTimer(timer); //When you want it to be killed use this
return 1;
}
Re: when i try to kill a timer i get errors? -
VirSpectorX - 10.07.2010
Try changing this:
pawn Код:
timer = SetTimer(bla, 3000, true); //Setting the timer for bla but defined as timer.
With this:
pawn Код:
timer = SetTimer("bla", 3000, true); //Setting the timer for bla but defined as timer.
Re: when i try to kill a timer i get errors? -
BP13 - 10.07.2010
Well I was just using a very rough example for him to change his timer. I'm sure he can figure it out.
Re: when i try to kill a timer i get errors? - WackoX - 10.07.2010
Show line 1912 and everything around it.
Re: when i try to kill a timer i get errors? -
willsuckformoney - 10.07.2010
you mean you want to spectate the player that killed you?! if so i can help you now