21.09.2021, 14:59
If this is inside a single script you don't need to use storage at all.
Code:
backuplist = { '1/1/1', '1/1/2' }
-- save current values
values = {}
for _, addr in ipairs(backuplist) do
values[ addr ] = grp.getvalue(addr)
end
...
-- restore values
for addr, value in pairs(values) do
grp.write(addr, value)
end