Since both commands are custom, my first guess is that these commands may not exist in Hercules. although this error seems a bit weird for that... but my first suggestion would be to make sure you have those script commands in Hercules (maybe try to run them in a separate script to make sure they exists and work)