17.04.2011, 17:43
One of my problems only happens on windows hosts. Some of my SetTimerEx fail to call the corresponding functions once in a while. There's nothing wrong with the code since it works on Linux Host but I need it to work as well on Windows hosts. I have quite a few SetTimerEx around the code, but I don't think there is a limit or anything that may cause such a thing. If you know what it can be please post here.
Ok, I have a problem with Y_INI, the files save correctly but they don't load. The script used to load them is posted bellow.
Thanks for reading,
James
Ok, I have a problem with Y_INI, the files save correctly but they don't load. The script used to load them is posted bellow.
pawn Code:
// This is OnGameModeInit
~
new factionfile[128];
for(new i; i<MAX_FACTIONS;i++)
{
format(factionfile, sizeof (factionfile), "Factions/%d.INI", i);
if(!fexist(factionfile)) SaveFaction();
INI_ParseFile(factionfile, "LoadFaction", .bExtra = true, .extra = i, .bLocal=true);
}
// This is somewhere on the script
forward LoadFaction(factionid, name[], value[]);
public LoadFaction(factionid, name[], value[])
{
if(!strcmp(name,"Name")) strmid(FactionInfo[factionid][fName], value, 0, 32, 32);
if(!strcmp(name,"Rank1")) strmid(FactionInfo[factionid][fRank1], value, 0, 15, 15);
if(!strcmp(name,"Rank16"))strmid( FactionInfo[factionid][fRank16], value, 0, 15, 15);
if(!strcmp(name,"Skin1")) FactionInfo[factionid][fSkin1]=strval(value);
if(!strcmp(name,"InteriorX")) FactionInfo[factionid][fInteriorX]=floatstr(value);
if(!strcmp(name,"InteriorY")) FactionInfo[factionid][fInteriorY]=floatstr(value);
if(!strcmp(name,"InteriorZ")) FactionInfo[factionid][fInteriorZ]=floatstr(value);
if(!strcmp(name,"ExteriorX")) FactionInfo[factionid][fExteriorX]=floatstr(value);
if(!strcmp(name,"ExteriorY")) FactionInfo[factionid][fExteriorY]=floatstr(value);
if(!strcmp(name,"ExteriorZ")) FactionInfo[factionid][fExteriorZ]=floatstr(value);
if(!strcmp(name,"Interior")) FactionInfo[factionid][fInterior]=strval(value);
if(!strcmp(name,"Locked")) FactionInfo[factionid][fLocked]=strval(value);
return 1;
}
James