Loading with y_ini?
#2

If you know how many businesses you have or the max amount you can have then you can do something like this:

pawn Код:
#define MAX_BIZ 10

enum b_
{
    Float:a,
    b,
};
new Biz[MAX_BIZ][b_];

new string[128];

stock LoadBusinesses()
{
    for(new i; i < MAX_BIZ; i++)
    {
        format(string, sizeof(string), "Businesses/Biz_%d", i);
        if(fexist(string))
        {
            INI_ParseFile(string, "LoadBiz", .bExtra = true, .extra = i);
        }
    }
    return 1;
}

forward LoadBiz(i);
public LoadBiz(i)
{
    //....
}
Reply


Messages In This Thread
Loading with y_ini? - by arko123 - 22.04.2014, 22:57
Re: Loading with y_ini? - by Chenko - 22.04.2014, 23:46

Forum Jump:


Users browsing this thread: 1 Guest(s)