19.01.2023, 20:07
I think the script will not work because of your 2nd IF statement and the declaration of STAV at the beginning.
if STAV = 0 then do something, but if STAV is not zero do something ELSE.
Then in that ELSE statement you check in your REPEAT loop if STAV is 0 again, but you ended there because STAV was something else than zero and you don't re-poll the STAV value, so you'll never meet that condition. I guess...
if STAV = 0 then do something, but if STAV is not zero do something ELSE.
Then in that ELSE statement you check in your REPEAT loop if STAV is 0 again, but you ended there because STAV was something else than zero and you don't re-poll the STAV value, so you'll never meet that condition. I guess...