mIRC has never made any attempt or claims to attempt to validate for poor coding and invalid syntax. Follow instructions and ask users for help if you don't understand basic programming precepts. mIRC does not contain an IDE (integrated development environment) so you are on your own bud.
I have created a set of language definitions for Notepad++ to highlight reserved words which I am happy to share if anyone is interested - but it will not pick up this error.
On my to do list is to create a better syntax highlighter / checker for Visual Studio Code. Happy to be part of or lead a team on this.