I'm sure this code makes the whole client crash, but I'm not sure what is the issue.
Could you please help me out?
Thanks!
Could you please help me out?
Thanks!
function wait_busy(cmd)
EnableGroup("wait_busy",1)
SetVariable("wait_busy_isbusy", "y")
while true do
if GetVariable("wait_busy_isbusy") == "y" then
DoAfterSpecial(0.3,'SendNoEcho("checkbusy")',12)
elseif GetVariable("wait_busy_isbusy") == "n" then
EnableGroup("wait_busy",0)
if cmd then
Execute(cmd)
end
break
else
break
end
end
end
<triggers>
<trigger
expand_variables="y"
group="wait_busy"
keep_evaluating="y"
match="^You are not busy$"
name="wait_busy_disable"
regexp="y"
script="wait_busy_disable"
send_to="12"
sequence="100"
variable="wait_busy_disable"
>
<send>SetVariable("wait_busy_isbusy", "n")</send>
</trigger>
</triggers>