INI_ParseFile Problem
#1

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

No one :X ?
Reply
#3

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
Reply
#4

No one still :X ,really bad :X
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)