This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script change in database activation
#6
Use this:
Code:
data = [[alert('testing')]]

name = 'imported_from_ftp'
item = script.get(name)

if item then
  item.script = data

  -- update script code in the database
  db:update('scripting', { script = data }, { id = item.id })

  -- update script code in the filesystem
  script.save(item, true)

  -- restart script
  script.disable(name)
  script.enable(name)
end
Reply


Messages In This Thread
RE: Script change in database activation - by admin - 16.06.2021, 09:19

Forum Jump: