See http://en.wikichip.org/wiki/Introduction_-_mIRC, specifically the part about block of code

You cannot put elseif on the same line right after the }, or you need a pipe character: '|'
The way you use { return } is also wrong


#mircscripting @ irc.swiftirc.net == the best mIRC help channel