Y_INI Loading.
#1

Hi I'm new to scripting how to load something into a variable using y_ini? I've tried this code taken from Y_INI Tutorial and it doesn't work can anyone tell me about it.
pawn Код:
new
gSomeInteger;

forward anyini_examples(name[], value[]);
public anyini_examples(name[], value[])
{
    INI_Int("some_integer", gSomeInteger);
        return 1;
}


CMD:test(playerid,params[])
{
    INI_ParseFile("mine.INI", "anyini_%s");
    printf("%i",gSomeInteger);
    return 1;
}
CMD:makeinteger(playerid,params[])
{
    new file[20];
    format(file,sizeof(file),"mine.INI");
    if(fexist(file))
    {
        new INI:File = INI_Open(file);
        INI_SetTag(File,"examples");
        INI_WriteInt(File,"gSomeInteger",1);
        INI_Close(File);
    }
    else
    {
        print("file dont exist");
    }
    print("executed!");
    return 1;
}
Prints:
pawn Код:
 
Thnx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)