Here is a condensed/altered version of your code:

Code:
var %n = $eval($+(%,$network),2)
if ((%n != $null) && (!$istok(%n,$me,32))) nick $gettok(%n,$r(1,$numtok(%n,32)),32)



When you are using dynamic variables, you only need to use $eval OR [ ] brackets, not both at the same time.

% [ $+ [ $network ] ]

is the same as

$eval(% $+ $network,2)

As for your code not working, when it 'explodes' do you get any error messages in your status window? mIRC halts code execution anytime there is an error in your code. When your variable doesn't exist, your code is trying to change your /nick to nothing/$null which is invalid and causes an error which stops the code execution.

-genius_at_work