I keep getting a critical error stating that I need to have an exit for my wait loop. I have an exit built into the loop, but it doesn't seem to recognize it. The script compiles successfully and works. I have often encountered this and have not been able to figure out how to get the debugger to see that there is an exit. Here is the script I created. If there is a flaw in my scripting, please correct me.
If out of service HD_SK or
logged agent count HD_SK =0
then execute script HD_BK_APP
end if
If not out of service HD_SK
then queue to skillset HD_SK with priority 1
Wait 2
end if
Give Music On_Hold_Jam
Section Wait_Loop
If not queued then
If out of service HD_SK or
logged agent count HD_SK =0
then execute script HD_BK_APP
else queue to skillset HD_SK with priority 1
end if
end if
If age of call > 60
then execute script HD_BK_APP
end if
wait 30
execute wait_loop
If out of service HD_SK or
logged agent count HD_SK =0
then execute script HD_BK_APP
end if
If not out of service HD_SK
then queue to skillset HD_SK with priority 1
Wait 2
end if
Give Music On_Hold_Jam
Section Wait_Loop
If not queued then
If out of service HD_SK or
logged agent count HD_SK =0
then execute script HD_BK_APP
else queue to skillset HD_SK with priority 1
end if
end if
If age of call > 60
then execute script HD_BK_APP
end if
wait 30
execute wait_loop