local script = [[
{$lua}
if syntaxcheck then return end
[ENABLE]
print'enabled'
[DISABLE]
print'disabled'
]]
local disableinfo
function toggleScript()
local success, enabled = false, disableinfo == nil
success,disableinfo = autoAssemble(script, disableinfo)
if not success then
local msg = disableinfo
disableinfo = nil
error(msg or 'Could not toggle the script')
end
if not enabled then
-- successfully disabled the script
disableinfo = nil
end
end
_________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum