26.09.2017, 16:01
(
Последний раз редактировалось None1337; 26.09.2017 в 17:44.
)
Hello, i have a report system, and i have a cod in my global timer (1000) and when is executed the server crash, i don't know why , its maybe because of Iterator?
This is my code:
What is the problem?
This is my code:
Код:
new Iterator:Reports<MAX_REPORTS>;
task servertimer_global[1000]() {
foreach(new x : Reports) {
if(Reports[x][vaLide] && (gettime()-Reports[x][Time]) > 499) {
Reports[x][vaLide] = 0;
Reports[x][Type] = 0;
Reports[x][rFrom] = INVALID_PLAYER_ID;
Reports[x][rTo] = INVALID_PLAYER_ID;
format(Reports[x][message], 256, "NULL");
Iter_Remove(Reports, x);
}
}
}



) and it works perfectly.