11.08.2012, 16:29
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
I read y_ini topic and I could not understand what he means with
and
Can someone help me ? I give 1+, thanks
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; }
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. }
Code:
INI_Load("myini.ini");