You don't need to escape characters in MSL, there are certain exceptions, in this case, you get an error because you have the { bracket on a separate line, it must be on the same line as the /if command, like this:
on ^*:TEXT:*:#:{ if (*_/_* isin $1) { echo true } }