INI_ParseFile problem
#1

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)