No matter what the parameter is, it will crash mIRC if it exceeds certain length. Try these:

//font -a $str(x,40)
//font -z blah $str(x,40)


Longer strings seem to be more traumatic to the system. Here (Win98se), $str(x,800) called up the white close/ignore failure box.