Wow idk it still dosent work

I have a auto voice script usuing the join command right above this, and it works fine.
on !*:join:#mychan: {
.msg $nick ...
.msg $nick ...
.msg $nick ..
}
Edit: I was also getting this error "* /if: invalid format (line 344, script.ini)" line 344 is the first .msg $Nick....
and would replacing the !, with a %or$ allow it to only with if im hop'd or op'd?