mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Updated function docs for get_ini_config
This commit is contained in:
@@ -1838,44 +1838,43 @@
|
||||
- name: get_ini_setting
|
||||
detail: int get_ini_setting(string setting)
|
||||
doc: |
|
||||
Reads an integer value from an ini file in the fallout directory.
|
||||
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.
|
||||
- If setting argument is in invalid format, -1 is also returned.
|
||||
- If the file or key cannot be found or the setting argument is in an invalid format, it returns -1.
|
||||
- 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.
|
||||
- It can also be used to get sfall settings by using **ddraw.ini** as the file name.
|
||||
opcode: 0x81ac
|
||||
- name: get_ini_string
|
||||
detail: string get_ini_string(string setting)
|
||||
doc: |
|
||||
Reads a string value from an ini file in the fallout directory.
|
||||
- If the file or key cannot be found, an empty string is returned.
|
||||
- If setting argument is in invalid format, -1 (integer) is returned.
|
||||
Reads a string value from an ini file in the Fallout directory.
|
||||
- If the file or key cannot be found, it returns an empty string.
|
||||
- If the setting argument is in an invalid format, it returns -1 (integer).
|
||||
opcode: 0x81eb
|
||||
- name: get_ini_section
|
||||
detail: array get_ini_section(string file, string sect)
|
||||
doc: |
|
||||
Returns an associative array of keys and values for a given INI file and section.
|
||||
- If INI file is not found, will return an empty array.
|
||||
- All keys and their values will be of String type.
|
||||
- If the INI file is not found, it returns an empty array.
|
||||
- __NOTE:__ all keys and their values will be of String type.
|
||||
macro: sfall.h
|
||||
- name: get_ini_sections
|
||||
detail: array get_ini_sections(string file)
|
||||
doc: |
|
||||
Returns an array of names of all sections in a given INI file.
|
||||
- If INI file is not found, will return an empty array.
|
||||
- If the INI file is not found, it returns an empty array.
|
||||
macro: sfall.h
|
||||
- name: get_ini_config
|
||||
detail: array get_ini_config(string file)
|
||||
doc: |
|
||||
Loads given INI file and returns a permanent array (map) where keys are section names and values are other permanent arrays (maps) where keys and values are strings.
|
||||
- File will be searched in normal file system like with all other ini-related functions.
|
||||
- Subsequent calls for the same file will return the same array, unless it was disposed using free_array.
|
||||
Loads a given INI file and returns a permanent array (map) where keys are section names and values are permanent sub-arrays (maps) where keys and values are strings.
|
||||
- Searches the file in the regular file system, like with all other ini-related functions.
|
||||
- Subsequent calls for the same file will return the same array, unless it was disposed using `free_array`.
|
||||
macro: sfall.h
|
||||
- name: get_ini_config_db
|
||||
detail: array get_ini_config_db(string file)
|
||||
doc: Works exactly like get_ini_config except files are loaded from database (DAT) instead of regular file system.
|
||||
doc: Works exactly like `get_ini_config`, except it searches the file in database (DAT) files. If not found, then it will try the regular file system.
|
||||
macro: sfall.h
|
||||
- name: set_ini_setting
|
||||
detail: void set_ini_setting(string setting, int/string value)
|
||||
|
||||
Reference in New Issue
Block a user