What you have in "Logs" on Logic Machine when you run this code:
Code:
<?
require('apps')
name = getvar('name')
scriptdata = getvar('script')
log(name, scriptdata) -- THIS CODE LOGS VARIABLES IN LM LOGS
if name and scriptdata then
item = script.get(name)
if item then
item.script = scriptdata
db:update('scripting', { script = scriptdata }, { id = item.id })
script.save(item, true)
-- reload script/group monitor
script.reloadsingle(item)
print('update ok')
else
print('script not found')
end
else
print('invalid arguments')
end
?>
Done is better than perfect