INI_Parse runs many times
#1

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:
PHP код:
INI_ParseFile(filename"LoadObj", .bExtra true, .extra playerid, .bPassTag true); 
And here's the LoadObj function:
PHP код:
forward LoadObj(playeridtag[], name[], value[]);
public 
LoadObj(playeridtag[], name[], value[])
{
    new 
objectsstrrr[128];
    
INI_Int("totalobjects"objects);
    
format(strrrsizeof(strrr), "{00FFFF}[DEBUG]{FFFFFF} there are {FF0000}%d{FFFFFF} objects"objects);
    
SendClientMessage(playerid, -1strrr);
        return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)