12.04.2012, 10:01
(
Последний раз редактировалось park4bmx; 12.04.2012 в 13:35.
)
i have many different files created in Scriptfiles they all are like this ID1/ID/2 and it just goes up!
But the problem is when i load them only the ID0 gets loaded but the rest dont :X
Why ?
i printed them just for the test and like i said only for ID0 it loads the data.
But the problem is when i load them only the ID0 gets loaded but the rest dont :X
Why ?
pawn Код:
forward LoadSettings(IDs, name[], value[]);
public LoadSettings(IDs, name[], value[])
{
if(!strcmp(name, "PosX"))SetPVarFloat(IDs,"PosX", strval(value));
if(!strcmp(name, "PosY"))SetPVarFloat(IDs,"PosY", strval(value));
if(!strcmp(name, "PosZ"))SetPVarFloat(IDs,"PosZ", strval(value));
if(!strcmp(name, "Money"))SetPVarInt(IDs,"Money", strval(value));
}
Loop(IDs,MAX_HOUSES)//for(new %0 = 0; %0 < %1; %0++)
{
new file[80];
format(file,sizeof(file),"/ID%d.txt",IDs);
if(fexist(file))
{
INI_ParseFile(file, "LoadSettings", false, true, IDs, true, false);
new Float:LoadX,Float:LoadY,Float:LoadZ;
LoadX = GetPVarFloat(IDs, "PosX");
LoadY = GetPVarFloat(IDs, "PosY");
LoadZ = GetPVarFloat(IDs, "PosZ");
printf("PozX: %f",LoadX);
printf("PozY: %f",LoadY);
printf("PozZ: %f",LoadZ);
}
}