c_config
Functions
add_int
Argument | Type | Required |
---|---|---|
value | number | + |
var_name | string | + |
returns | config_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
Argument | Type | Required |
---|---|---|
value | number | + |
var_name | string | + |
returns | config_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
Argument | Type | Required |
---|---|---|
value | boolean | + |
var_name | string | + |
returns | config_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