SA-MP Forums Archive
INI_Parse runs many times - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: INI_Parse runs many times (/showthread.php?tid=648982)



INI_Parse runs many times - Viggo - 31.01.2018

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;