As drum stated, you need to escape any identifiers when passing to mIRC via script.

$!chr(35)


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"