Not loading (?)
#5

pawn Код:
INI_ParseFile(string, "LoadHouses_%d", .bExtra = true, .extra = idx );
This function would be used to load 'tags' from the LoadHouses function, but LoadHouses uses no tags, so you want to pass the tag through the function by doing the following:
pawn Код:
INI_ParseFile(string, "LoadHouses", .bExtra = true, .extra = idx, .bPassTag = true);
Also, I recommend that you check the file exists for doing this, so I've added that in for you.

Your complete code is:
pawn Код:
public OnGameModeInit()
{
    new string[40];
    for(new idx = 0; idx < sizeof(HInfo); idx++)
    {
        format(string, sizeof(string), HOUSE_PATH, idx);
        if(!fexist(string)) continue;
        INI_ParseFile(string, "LoadHouses", .bExtra = true, .extra = idx, .bPassTag = true);
        new labelstring[50];
        if(!HInfo[idx][Owned]) format(labelstring, sizeof(labelstring), "Owned: No \nPrice: %i", HInfo[idx][Price]);
        else format(labelstring, sizeof(labelstring), "Owned: Yes \n Owner: %s", HInfo[idx][Owner]);
        HInfo[idx][HouseLabel] = Create3DTextLabel(labelstring, 0xFF0000FF, HInfo[idx][XPos], HInfo[idx][YPos], HInfo[idx][ZPos], 25.0, HInfo[idx][VirtualWorld]);
    }
    return 1;
}
Reply


Messages In This Thread
Not loading (?) - by DaniceMcHarley - 27.07.2014, 19:55
Re: Not loading (?) - by [XST]O_x - 27.07.2014, 20:17
Re: Not loading (?) - by DaniceMcHarley - 27.07.2014, 20:25
Re: Not loading (?) - by DaniceMcHarley - 27.07.2014, 22:16
Re: Not loading (?) - by Threshold - 27.07.2014, 23:22
Re: Not loading (?) - by DaniceMcHarley - 27.07.2014, 23:44
AW: Not loading (?) - by Threshold - 28.07.2014, 05:07
Re: Not loading (?) - by BroZeus - 28.07.2014, 05:51
Re: Not loading (?) - by Threshold - 28.07.2014, 06:46
Re: AW: Not loading (?) - by DaniceMcHarley - 28.07.2014, 10:29

Forum Jump:


Users browsing this thread: 1 Guest(s)