Go to documentation repository
The AddIni method is used to write, change and read integer variable from the ini file. The method returns the value of the variable after its changing.
Syntax for method invocation:
function AddIni(varName: String, varValue: int, path: String): int
varName is a required argument. It specifies the name of the variable in the file.
varValue is a required argument. It specifies the value of the variable or the value which must be added to the existing value of the variable:
Example. There is no the MyVar variable in the C:\\test.ini file. Write to this file such a variable with the -1 value, then add 1 to it and display the result value in the script debug window.
var result = AddIni("MyVar", -1, "C:\\test.ini"); result = AddIni("MyVar", 1, "C:\\test.ini"); DebugLogString(result);