You can not add a token if the information is not there....
I have this same problem with two scripts

This is the other script and when it runs across a empty line it hans on me. Using this script as an example when it gets to the rline the script hangs when the %line is empty.
I have tried using If %line == $null But that will not work in this script.... any suggestions?

Code:
 [color:red] 

alias -l Test {
  var %count = 1 , %line
  while (%count <= $line(@Test,0)) {
    %line = $gettok($line(@Test,%count),1,32) $+ $chr(32) $+ $stripi($gettok($line(@Test,%count),2-,32))
    var %lcnt = $gettok(%line,32)
    echo -s %lcnt
    rline @Test %count %line
    inc %count
  }
}

 [/color]   




Intelligence: It's better to ask a stupid question, then to prove it by not asking....