Y_INI doesn't load
#1

I maked to save my turf in Y_INI, saving is working properly but i don't have idea how to make to load my SAVE.ini when gamemode start

Code:
 public SaveTurf()
{
    new count;
    new var[1240];
    new INI:file = INI_Open("Turfs.ini");
    INI_SetTag(file,"Turf");
    for(new i = 0;i<MAX_TURF;i++)
    {
        if(TurfInfo[i][Owner] != 0)
        {
        count++;
        format(var, 32, "Owner_%d", count);
        INI_WriteInt(file,var,TurfInfo[i][Owner]);
        format(var, 32, "MinX_%d", count);
        INI_WriteFloat(file,var,TurfInfo[i][MinX]);
        format(var, 32, "Miny_%d", count);
        INI_WriteFloat(file,var,TurfInfo[i][MinY]);
        format(var, 32, "MaxX_%d", count);
        INI_WriteFloat(file,var,TurfInfo[i][MaxX]);
        format(var, 32, "MaxY_%d", count);
        INI_WriteFloat(file,var,TurfInfo[i][MaxY]);
        format(var, 32, "CodTime_%d", count);
        INI_WriteInt(file,var,TurfInfo[i][CodTime]);
        }
	}
	INI_Close(file);
	return 1;
}
I read y_ini topic and I could not understand what he means with

Code:
 INI:myini[](name[], value[])
{
    INI_String("a", gA, len_of_gA);
    INI_String("b", gB, len_of_gB);
    INI_String("c", gC, len_of_gC);
    return 0; // This is now required.
}
and

Code:
 INI_Load("myini.ini");
Can someone help me ? I give 1+, thanks
Reply
#2

up, someone please ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)