31.01.2018, 20:03
Hello everyone,
I made a command for players, to load a file. They just write the file name and the file is supposed to be loaded, but instead, the LoadObj callback is called many many times and the message (Look LoadObj callback) is sent so many times, so the chat is spammed.
In short: I call the LoadObj callback once, and it gets spammed.
Help, please.
Here's the function to call LoadObj:
And here's the LoadObj function:
I made a command for players, to load a file. They just write the file name and the file is supposed to be loaded, but instead, the LoadObj callback is called many many times and the message (Look LoadObj callback) is sent so many times, so the chat is spammed.
In short: I call the LoadObj callback once, and it gets spammed.
Help, please.
Here's the function to call LoadObj:
PHP Code:
INI_ParseFile(filename, "LoadObj", .bExtra = true, .extra = playerid, .bPassTag = true);
PHP Code:
forward LoadObj(playerid, tag[], name[], value[]);
public LoadObj(playerid, tag[], name[], value[])
{
new objects, strrr[128];
INI_Int("totalobjects", objects);
format(strrr, sizeof(strrr), "{00FFFF}[DEBUG]{FFFFFF} there are {FF0000}%d{FFFFFF} objects", objects);
SendClientMessage(playerid, -1, strrr);
return 1;
}