GetINISection

From GECK
Jump to: navigation, search


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

Description

Returns a StringMap of all keys in the specified INI section, and their values, with 64k buffer.

  • INI files are read from and written to in the ..\Data\Config\ folder (as in MCM's INI functions). Format Example
  • The 2nd argument filename is optional. If omitted, the name of the mod the function is called from is used.
  • The 3rd argument getNumeric is optional. If non-zero, the values of the keys in the section will be returned as floats (rather than as strings).

Syntax

[help]
(array) GetINISection section:string filename:string getNumeric:1/0

Example

let aINISection := GetINISection "SectionName"
let aINISection := GetINISection "SectionName" "FilePath\FileName.ini" 1 

Notes

  • Writing to an INI file that does not exist will create it along with any non-existent subdirectories in its path.
  • A Key-string is a string containing both the section and a key in the format: "Section:Key" ('\' and '/' may also be used as the delimiter).

See Also