Hi, can You help me, the red part of script doesnt work to me. I need if STAV==1, to wait 5times x 10sec if it change to 0.
STAV=grp.getvalue("10/1/181")
pocet=5
if (event.getvalue()==true)
then
if(STAV==0)
then
grp.write("10/0/0", true)
end
else
repeat
os.sleep(10)
pocet=pocet-1
if(STAV==0)
then
grp.write("10/0/0", true)
end
until (pocet==0)
end
STAV=grp.getvalue("10/1/181")
pocet=5
if (event.getvalue()==true)
then
if(STAV==0)
then
grp.write("10/0/0", true)
end
else
repeat
os.sleep(10)
pocet=pocet-1
if(STAV==0)
then
grp.write("10/0/0", true)
end
until (pocet==0)
end