Y_ini loop loading question
#7

Well.. I must admit that it saves everything fine..
EDIT: looks like nothing is being loaded.. I also save string but for some weird reason it won't even load that..
(just apart of the code)
pawn Код:
new Float: gSomeVar[20][20][20];

TestPath(id)
{
    new str[20];
    format(str, sizeof(str), "/test/%d.ini", id);
    return str;
}

public OnGameModeInit()
{
     LoadAllTests();
     return 1;
}

Save(id)
{
    new str[20];
    for(new a; a < 20; a++)
    {
        for(new c; c < 20; c++)
        {
            format(str, sizeof(str),"Test%d%d", a, b);
            INI_WriteFloat(File, str, gSomeVar[id][a][b]);
        }
    }
    return 1;
}

LoadAllTests()
{
    for(new x = 1; x < 20; x++)
    {
        if(fexist(TestPath(x)))
        {
            INI_ParseFile(TestPath(x), "LoadTest_%s", .bExtra = true, .extra = x)
        }
    }
    return 1;
}

forward LoadTest_data(id, name[], value[]);
public LoadTest_data(id, name[], value[])
{
    new str[20];
    for(new a; a < 20; a++)
    {
        for(new b; b < 20; b++)
        {
            format(str, sizeof(str),"Test%d%d", a, b);
            INI_Float(str, gSomeVar[id][a][b]);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Y_ini loop loading question - by Loot - 28.11.2013, 19:39
Re: Y_ini loop loading question - by Jefff - 28.11.2013, 21:19
Re: Y_ini loop loading question - by Loot - 28.11.2013, 21:26
Re: Y_ini loop loading question - by Jefff - 28.11.2013, 22:21
Re: Y_ini loop loading question - by Loot - 28.11.2013, 22:33
Re: Y_ini loop loading question - by Jefff - 28.11.2013, 22:41
Re: Y_ini loop loading question - by Loot - 28.11.2013, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)