Timer... invalid function "UpdateServerStats()"
#1

Declaring

Код:
new UpdateServerStatsTimer;
Код:
forward UpdateServerStats();
Structure (function)

Код:
public UpdateServerStats() // Every 1 second
{
	return 1;
}
Calling

Код:
UpdateServerStatsTimer = SetTimerEx("UpdateSetverStats", 1000, true, "");
Error

Код:
[21:36:33] (TimerFix) ERROR: Invalid function ("UpdateSetverStats").
Reply
#2

UpdateServerStatsTimer = SetTimerEx("UpdateServerStats", 1000, true, "");

You had a 't' instead of 'r'.
Reply
#3

Well. In SetTimerEx you need to write the correct name of the function for what are you using it.

Name of your function used by timer is different, than name of the timer, check for that, you did a little mistake in that name.
Reply
#4

Today isn't a good day :@
Reply
#5

Use SetTimer instead of SetTimerEx since you never pass any argument to it though.
Reply
#6

Done, thanks for the tip Konstantinos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)