Yeah I used quotes and it does that, but for some mdx things it doesnt. It's weird. I chose to call the file as I mentioned and haven't seen any errors.

As for $scriptdir, I've seen it change from going to my main directory "SoulFly_v1" that mirc.exe is in, to my SoulFly folder. I just wanted it to return the same root directory everytime without hassles.