Classes
c_config

c_config

Functions

add_int

ArgumentTypeRequired
valuenumber+
var_namestring+
returnsconfig_var_t
local some_name = g_config:add_int(100, "some_name")
 
-- set config var value to 200
some_name:set_int(200)
 
print("Value is: " .. some_name:get_int()) -- prints 200

add_float

ArgumentTypeRequired
valuenumber+
var_namestring+
returnsconfig_var_t
local some_name = g_config:add_float(100, "some_name")
 
-- set config var value to 200
some_name:set_int(0.5)
 
print("Value is: " .. some_name:get_float()) -- prints 0.5

add_bool

ArgumentTypeRequired
valueboolean+
var_namestring+
returnsconfig_var_t
local some_name = g_config:add_bool(false, "some_name")
 
-- set config var value to 200
some_name:set_bool(true)
 
print("Value is: " .. some_name:get_bool()) -- prints true