Okay, here goes..

ive got these sclicks for my treeview switchbar (makes everything clickable) and i cant get it to work on the DCC stuff, all i get is: "* No such connection id: 1"

So my question is: Why?? and How do i get around it?? confused

Teh code:
Code:
on *:dialog:switchbar:sclick:1:{
  tokenize 32 $did(switchbar,1,1)
  echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $10
  if ($calc($4 - 1) <= $scid(0)) && (!$5) {
    scon $calc($4 - 1) 
    ;right here it is changing the scon so you can show the status window on the selected server
    window -a "status window"
    ;activating status window the scon server.
  }
  elseif ($5 = 2) && ($6) {
    scon $calc($4 - 1)
    ;right here it is changing the scon so you can show the channel window on the selected server 
    window -a $chan($calc($6 - 1))
    ;activating channel window the scon server. 
  }
  elseif ($5 = 3) && ($6) {
    scon $calc($4 - 1)
    ;right here it is changing the scon so you can show the query window on the selected server 
    window -a $query($calc($6 - 1))
    ;activating query window the scon server. 
  }[color:red]
  if ($4 == $calc($scid(0) + 2)) {
    ;Checking to see if it is the DCC branch
    if ($6) {
      echo -a dsfdsf
      if ($5 == 2) {
        echo -a asfdsa
        ;Checking if the active branch is gets.
        window -a "Get $get($calc($6 - 1)) $get($calc($6 - 1)).file $+ "
        ;Activating, or showing the selected get window
      }
      elseif ($5 == 3) {
        ;Checking if the active branch is sends.
        window -a "Send $send($calc($6 - 1)) $send($calc($6 - 1)).file $+ "
        ;Activating, or showing the selected send window
      }
      elseif ($5 == 4) {
        ;Checking if the active branch is Chats.
        window -a = $+ $chat($calc($6 - 1))
        ;Activating, or showing the selected chat window
      }
    }
  }[/color]
  if ($4 == $calc($scid(0) + 3) && $5) {
    window -a $window($calc($5 - 1))
  }
}

Its the part in red that doesnt work right. the output is:

slclick select mouse 4 2 2
-
* No such connection id: 1
-

The first line means something like:
click select(ed) (with) mouse (branch) 4 (subbranch) 2 (subsubbranch) 2

Here's another screenshot with the problem "in action": treeview
Look for the "DCCs: 2" and go from there in the output

Thx in advance!!!