INI Files
With the following commands you can save and load data to .ini files. Unlike with variables and stacks, the data is permanently saved and can be loaded again after you close and reopen LioranBoard.
Rules for saving and loading ini files:
-
Each file needs to have a specific structure for LioranBoard to read it, containing [section] and key=”value”.
- You can only save and load .ini files placed in your LioranBoard folder or one of its inner folders.
- Make sure to use the right command for loading and saving data. There are different commands for text (strings) and different commands for numbers (real values).
- Use relative path for loading and reading ini files. I.e.
test.ini
if you wanna load a file from your LioranBoard folder or/image/test.ini
if you wanna load one from your LioranBoard/image folder. - You do not need to include the extension when loading a file.
test
is totally acceptable.
Saves a number to .ini file.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to save the key under. |
Key | String | Name of the value to be saved. |
Value | String | Value to be saved as the key value. |
Saves text (string) to .ini file.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to save the key under. |
Key | String | Name of the value to be saved. |
Text | String | Text to be saved as the key value. |
Loads a number (real value) from .ini file. Will return 0 if it doesn’t exist.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file to load |
Section | String | The section to load the key |
Key | String | Name of the key to be loaded |
Variable | String | Variable name you want to save the loaded string under |
Loads text (string) from .ini file. Will return 0 if it doesn’t exist.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file to load |
Section | String | The section to load the key |
Key | String | Name of the key to be loaded |
Variable | String | Variable name you want to save the loaded string under |
Deletes a key within the specified section in a .ini file.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to find the key. |
Key | String | Key to delete. |
Deletes a whole section of a .ini file, along with all its keys inside of it.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to delete. |
Check if a key exists within a given section of a .ini file.
Returns 1 if the key exists and 0 if it does not exist.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to look inside of. |
Key | String | Name of the key you wish to check. |
Variable | String | Variable to save the result in. |
Checks if a section exists within the specified .ini file.
Returns 1 if the section exists and 0 if it does not exist.
Box Name | Type | Description |
---|---|---|
File Name | String | Name of the file. Will create one if it doesn’t exist. Do not include the path. |
Section | String | The section to check. |
Variable | String | Variable to save the result in. |