Also, a word of advice, as general practice a while(true) loop is never a good thing in Torque Script.
Even if I'm confident that I will properly exit the loop at some point with a break, I still do something like for(%i=0;%i<10000;%i++) just as protection that in case something isn't exactly right I won't just crash Blockland.