INI settings
Функции
get_ini_section
funcX
array get_ini_section(string file, string sect)
Returns an associative array of keys and values for a given INI file and section. NOTE: all keys and their values will be of String type.
get_ini_sections
funcX
array get_ini_sections(string file)
Returns an array of names of all sections in a given INI file.
get_ini_setting
int get_ini_setting(string setting)
- Reads an integer value from an ini file in the fallout directory.
- It only takes a single argument; seperate the file name, section and key with a “|” character; e.g.
myvar := get_ini_setting("myini.ini|mysec|var1")
If the file or key cannot be found, -1 is returned. - The file name is limited to 63 chars, including the extension.
- The section name is limited to 32 characters.
- It can also be used to get sfall’s settings, by using
ddraw.ini
as the file name.
get_ini_string
string get_ini_string(string setting)
Reads a string value from an ini file in the fallout directory.
modified_ini
int modified_ini
Returns the value of ModifiedIni setting in [Main]
section of the ddraw.ini file.
set_ini_setting
funcX
void set_ini_setting(string setting, int/string value)
Writes an integer or a string value to an ini file in the Fallout directory. If the ini file does not exist, it will be created The setting argument works in the same way as in get_ini_setting
, seperate the file name, section and key with a “|” character. Note: the file name is limited to 63 chars (including the extension), the section name is limited to 32 characters.