SetTimerEx problem.
#1

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 ( :
Reply
#2

try setting it to a variable.

pawn Код:
new tmp[128];
format(tmp,128,string);
Reply
#3

It working now. Thank you very much ( :
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)