06.01.2020, 20:55
(06.01.2020, 15:18)admin Wrote: This is not safe because it leads to race conditions which semaphores prevent. Can you explain why do you need this? If your function can fail due to an error you should execute it using pcall().Ok thanks,
what i am trying to achieve is to have a event script, switch on a group, start a timer then, timeout and switch off a group (also block the resident script from running again while the timer is running )
the event script is triggered by an security alarm message which can happen quite fast (every time the pir is triggered, this is why i want to block the script from running if it has been triggered so i don't have multiple scripts running)
are you able to point me in the right direction.
Many Thanks