Tis indeed a strange problem then, as I tested the code you posted (the problematic one) and it worked fine for me. Only thing I can think of is make sure you're using the latest version of mIRC and the code is in a separate remote file, if possible.
If that doesn't work though, and nobody else suggests what it could be, you could apply the principal of the following for whatever you're trying to accomplish:
on *:text:*:#:{
if (hello == $left($1,5)) {
msg # Hi $nick
}
}
Which is basically saying "if 'hello' is the first 5 characters from the left of the sentence, respond with Hi nickname".
Regards,