INI_ParseFile with no params, just single file. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: INI_ParseFile with no params, just single file. (
/showthread.php?tid=562784)
INI_ParseFile with no params, just single file. -
erminpr0 - 11.02.2015
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
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;
}
Re: INI_ParseFile with no params, just single file. -
erminpr0 - 12.02.2015
bump