The script wont work with $scriptdir, I just made the change as you suggested and now nothing is being sent or received. :(