I copied and past this form:
https://en.wikichip.org/wiki/mirc/identifiers/$chan

So it should work, but mIRC gives "Unknown Command"

Script:
Code
alias getDetails {
  if ($active ischan) {
    var %c = $active
    window @getDetails 350 350 650 200
    clear @getDetails
    echo @getDetails Channel: %c
    echo @getDetails $crlf $crlf
    echo @getDetails Topic: $chan(%c).topic
    echo @getDetails $crlf $crlf
    echo @getDetails Modes: $chan(%c).mode
    echo @getDetails $crlf $crlf
    echo @getDetails Key: $iif($chan(%c).key,$v1,No key set)
  }
}


Even loaded example scripts but gives same error.

Please help.