config.create_from_menu works great for me.
But how can I get and set values in the config without using a menu?
My autorun script needs to store state between reboots, and using a hidden menu (in addition to actual menu items) just to store state is not great
I tried it like this, for example:
But cfg is not defined.
I tried using "config" instead, but no dice.
But how can I get and set values in the config without using a menu?
My autorun script needs to store state between reboots, and using a hidden menu (in addition to actual menu items) just to store state is not great
I tried it like this, for example:
Code Select
config.create_from_menu(preset_menu_ratio);
if cfg.data ~= nil then
cfg = config:load()
for key,value in ipairs(cfg) do
display.notify_box(tostring(key) .. " " .. tostring(value));
sleep(1);
end
end
But cfg is not defined.
I tried using "config" instead, but no dice.