Lua API

Config module

Functions for getting and setting config values.

See the topic on creating config menus for more details.

Usage

local Config = ELONA.require("core.Config")

Functions

set (key, value) Sets config item's value.
get (key) Gets config item's value.
save () Saves the current sate of the config to the config options file.

Functions

# set (key, value)

Sets config item's value.

Parameters:
  • key : (string) Option key
  • value : (any) Option value
Raises
if the config item does not exist or is not a boolean, an integer, or a string.
# get (key)

Gets config item's value.

Parameters:
  • key : (string) Option key
Raises
if the config item does not exist or is not a boolean, an integer, or a string.
# save ()

Saves the current sate of the config to the config options file.

Be sure to call this when you modify the config using this API.