mIRC Homepage
Posted By: maroon while loop + continue - 02/05/22 05:54 AM
The fix of this
https://forums.mirc.com/ubbthreads.php/topics/269642/nested-while-loops-issue
bug appears to have caused another one to pop up, as this new behavior is not in nobeta 7.67

Executing /while_continue1 or pasting the interior //command into the editbox now results in an infinite loop due to repeatedly executing the initialization for i=1 as well as the red echo. However, it's suffiicient to avoid the infinite loop by /while_continue2 having the closing bracket for the while() being on a separate line

Note: you will need ctrl+break to exit /while_continue1

Code
alias while_continue1 {
  //var -s %i 1 | echo 4 this should show only once | while (%i < 10) { echo 3 while loop i= %i | if (1) { inc -s %i 2 | continue } | }
}
alias while_continue2 {
  //var -s %i 1 | echo 4 this should show only once | while (%i < 10) { echo 3 while loop i= %i | if (1) { inc -s %i 2 | continue }
  }
}


also infinite loop:
//var -s %i 1 | echo 4 this should show only once | while (%i < 10) { echo 3 while loop | inc -s %i | if (1) continue }
Posted By: Khaled Re: while loop + continue - 02/05/22 11:31 AM
Thanks this issue has been fixed for the next version.
© mIRC Discussion Forums