SetINISection

From GECK
Jump to: navigation, search


A function added by the Lutana NVSE plugin, now part of the JIP NVSE Plugin.

Description

Sets the values of multiple keys in an INI section using a stringmap array.

JIP NVSE Plugin v40 merged Lutana NVSE plugin v19. As of JIPv40, This function's syntax was changed from Lutana v19, requiring that you pass the arrays via their IDs (set to integers) if you use the script compiler override (CO).

Syntax

[help]
SetINISection section:string keysValuesArrayID:array filename:string 

Example

array_var arrKeysValues

SetINISection "SectionName", arrKeysValues, "MySubFolder/MyFileName"
(or)
SetINISection "SectionName", arrKeysValues, "MySubFolder/MyFileName.ini"

Example with CO

array_var arrKeysValues
int iArrKeysValuesID
...
set iArrKeysValuesID to arrKeysValues
SetINISection section:string iArrKeysValuesID:int filename:string


Notes

  • INI files are read from and written to in the Data\config\ folder (as in MCM's INI functions). Format Example
  • Subdirectories can be defined in the path, e.g. "subDir\nameOfFile". Note that the .ini file does not need to have the .ini extension in the filepath. This was the case in Lutana and is the case in JIP from version 41.10. Both forward and backward slashes are accepted in the filepath string.
  • Writing to an INI file that does not exist will create it along with any non-existent subdirectories in its path.

See Also