The problem seems to be that %cid2 has no value. The /scon command has this format:

/scon <switches> <connection> <command> <arguments>

so if %cid2 has no value, the command gets these parameters:

/scon <-t1> <notice> <value_of_$nick> <value of %topic>

The "notice" is being considered the cid (without throwing an error for some reason) and then since the next parameter is $nick, it is being considered the command.

Note: The OP should comment out the red line until this problem can be resolved.

-genius_at_work