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.

Change Active Status of a Script
#5
Hi

Here is the output of the your test code - it's working

Code:
TEST 13.05.2021 18:43:24
* arg: 1
  * bool: true
* arg: 2
  * nil

I found the error in my earlier code too .. working function below

Code:
-- Change active status of script
function enableScript(scriptname, active)
 
  if active == true then
   script.enable(scriptname)
   log('Script "' .. scriptname .. '" is active')
  else
   script.disable(scriptname)
    log('Script "' .. scriptname .. '" is disabled')
  end
 
end

Many thanks

Kind Regards
James
Reply


Messages In This Thread
Change Active Status of a Script - by jamesng - 13.05.2021, 06:07
RE: Change Active Status of a Script - by jamesng - 13.05.2021, 08:46

Forum Jump: