Code:
 on @*:text:!warn*:#BlackIntel: {
  if ($nick isop $chan) && ($2 isin $chan) {
    msg $chan $2 $+ , You have been warned by $nick for: $3-
    set $+(%,warn,.,$2) $iif(!$($+(%,warn,.,$2),2),1,$calc($v1 + 1))
    if $($+(%,warn,.,$2),2) == 3 {
      .kick $chan $2
      unset $+(%,warn,.,$2)
    }
  }
  else {
    msg $chan $2 is not in the channel.
  }
} 
 

The problem was that you weren't checking to see if $2 (the person being warned) was in the channel.
I also included an example of how the number of warnings could be tracked and the kick command (after three warnings)