Apparently you copied and pasted the script into your remote directly. Some of the hash tables are not made right before you've restarted your mIRC. To work around the error, locate hadd and hinc (if they don't have the -m switch already) commands and put a -m switch next to them. e.g.
hadd -m
hinc -m
so on and so forth...