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.
Method call syntaxSyntax for method invocation:
| Code Block |
|---|
function AddIni(varName: String, varValue: int, path: String): int |
varName – is a required argument. Sets It specifies the name of the variable in the file.
varValue – is a required argument. Sets It specifies the value of the variable or the value which should 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 to the file, then add 1 to it and display the result value on in the script debug window.
| Code Block |
|---|
var result = AddIni("MyVar", -1, "C:\\test.ini");
result = AddIni("MyVar", 1, "C:\\test.ini");
DebugLogString(result); |