11.02.2015, 18:17
Don't know how to use INI_ParseFile without params, just reading from One single file .
what i tried: // example, I use it for other stuff which works same way as code below
what i tried: // example, I use it for other stuff which works same way as code below
pawn Код:
new Int1, Int2, Int3;
forward load(name[], value[]);
public load(name[], value[])
{
new ScanfString[128];
INI_String("FileString", ScanfString, 128);
sscanf(ScanfString, "iii", Int1, Int2, Int3);
return 1;
}
stock save()
{
new INI:File = INI_Open("myFile.ini");
new str[128];
format(str, sizeof(str), "%d %d %d", Int1, Int2, Int3);
INI_WriteString(File, "FileString", str);
INI_Close(File);
}
public OnFilterScriptInit()
{
INI_ParseFile("myFile.ini", "load", .bExtra = false); // Don't know how to use properly if I don't use params
return 1;
}
public OnFilterScriptExit()
{
save();
return 1;
}