Just a reminder about mIRC freezes. If it's caused by doing something extremely slow, such as using $findfile to count all the files below C:\ then your choice are to either wait out the search or kill mIRC.
However, if it's caused by mIRC becoming stuck inside an infinite loop, you can escape them by holding down the control-break key-combination, instead of having to kill your mIRC and restart. As you break out of the script, you'll see a message telling what scriptname/line-number it broke at. This line sometimes indicates a location *near* the problem causing the loop, but it's also possible that the break may sometimes just *happen* to exit from a subroutine or $identifier far away from the problem.