SetTimerEx problem. - 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: SetTimerEx problem. (
/showthread.php?tid=126360)
SetTimerEx problem. -
Freddy19 - 08.02.2010
Hello,
I have a problem with SetTimerEx. When I use this function with string in argument in any timer, my server shutting down. For example:
Код:
public OnFilterScriptInit()
{
new var = 7;
new string[8] = "hello";
SetTimerEx("Function", 5000, 0, "is", var, string);
return 1;
}
forward Funcion(time, string[]);
public Function(time, string[])
{
if(time > 0)
{
printf("time = %d, string = %s", time, string); // server print the time and string good
SetTimerEx("Function", 5000, 0, "is", time-1, string); // this line shutting my server down, I checked this
}
return 1;
}
I will be grateful for any help ( :
Re: SetTimerEx problem. -
Joe Staff - 08.02.2010
try setting it to a variable.
pawn Код:
new tmp[128];
format(tmp,128,string);
Re: SetTimerEx problem. -
Freddy19 - 08.02.2010
It working now. Thank you very much ( :