The file needs to be in mIRC's root directory, which is not necessarily the same folder you have the script in.

Make sure there aren't other on ACTION events that trigger above it in the same file, too.