SA-MP Forums Archive
INI_ParseFile problem - 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_ParseFile problem (/showthread.php?tid=332261)



INI_ParseFile problem - Antonio144 - 07.04.2012

Hi. So my INI_ParseFile function loads 5 times. It should load only ones.

Heres the code

pawn Код:
forward LoadHouses_Weapons(x, name[], value[]);
public LoadHouses_Weapons(x, name[], value[])
{
    printf("I should see this only one time but i see it 5 times");
    new wname[34];
    GetWeaponName(x,wname,34);
        INI_Int(wname,weaponinfo[x][1]);
    return 1;
}

// calling
    new i = 2; // lets assume that i=2
    new stringx[50];
    new h = GetClosetHouseIntID(playerid);
    format(stringx,sizeof(stringx),"/Houses/%s.ini",HouseInformation[h][Hname]);
    INI_ParseFile(stringx, "LoadHouses_Weapons", .bExtra = true, .extra = i);
I cant find a reason why would it load 5 times, all my other INI_ParseFile are working correctly.

All help is greatly appreciated.