How do I get mIRC to set a %variable when I type /dns blah-blah

on *:DNS: { var %dnsname (what to have here ?) }
$2, $DNSIP(N) nothing seem to work frown

The script should look like this:
on *:DNS: { 
  set %dnsname (missing variable)
  if ((!$iaddress) && (!$naddress) && (!$raddress)) { echo -a cant resolve %dnsname }
  else {
    echo -a -× Displaying DNS-Info for: %dnsname
    if $iaddress { echo -a IP Address $iaddress
    if $naddress { echo -a Address $naddress } 
    if $raddress { echo -a Address $raddress } 

all works cept the %variable isnt set, and I ran out of ideas frown