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=333639)
INI_ParseFile Problem -
park4bmx - 12.04.2012
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 ?
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);
    }
  }
i printed them just for the test and like i said only for
ID0 it loads the data.
Re: INI_ParseFile Problem -
park4bmx - 12.04.2012
No one :X ?
Re: INI_ParseFile Problem -
park4bmx - 12.04.2012
done multiple test and Still... Cant figure it out ,need some help

i have 3 files in my
Scriptfiels which are
ID0,ID1,ID2 it loops all of them but the thing is it only loads the
ID0 from 3 of them:X
Re: INI_ParseFile Problem -
park4bmx - 12.04.2012
No one still :X ,really bad :X