ya has nothing to do with the file location on line 116, and 117 there is a variable that is used but not defined anywhere, from his code i cant really tell if it was supposed to be a argument, or a global variable from a other procedure.
I'm self-taught in MEL/programming so I don't know the best or correct way to organize code heh :\ Line 116 and 117 were the problems, it was calling a global variable that wasn't defined inside the procedure. I have updated the link and it should work now! Sorry about that. Latest Version Here