I found an issue which features the same observation that can be found in most of these while loop issues: a while loop is terminated too early. So I decided to post here, but I actually don't think it's solely a while loop parsing issue, rather a /reseterror and while loop combination. Execute in an editbox:
//var %a action add ajinvite ,%b 1,%c %a | while ($gettok(%a,%b,32)) { var -s %v $v1 | [ $mid($v1,1,1) $++ $mid($v1,2) ] | :error | if ($error) { var -s %c $remtok(%c,%v,32) | reseterror } | inc -s %b } | echo -ag list : %c
I have not tested yet if rewriting this into a multiline, clean, alias works or not. The [ $++ ] fancy part is to prevent mIRC from aborting the execution of a statement from the editbox if it starts with a % or a '$'.
This will execute the command /action first (don't ask why it's built dynamically), causing an error, which is caught by :error and then the error is reset. %b is then correctly increased to 2, however the while loop stops running at this point with the effect similar to the reports above: it skips the loop but still execute the rest of the code, here the /echo.
Tested on 7.77.
Possibly related to these /reseterror reports
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/269601/ and
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/270141/