the problem was it was evaluating the text, heh.
just in case anybody wants it :\
Code:
alias isloaded {
  var %i 1,%file $1,%loaded 0
  while (%i <= $script(0)) {
    if ($nopath($script(%i)) == %file) {
      %loaded = 1
    }
    inc %i
  }
  return %loaded
}
alias getpath {
  var %i 1,%file $1,%path 0
  while (%i <= $script(0)) {
    if ($nopath($script(%i)) == %file) {
      %path = $script(%i)
    }
    inc %i
  }
  return %path
}
alias winerr {
  var %x 1,%file $1
  window -h @error
  while (%x <= $lines($+(",$getpath(%file),"))) {
    aline @error $strip($read($+(",$getpath(%file),"),n,%x))
    inc %x
  }
}
alias error {
  var %g 1,%error 0,%file $1, %error.line
  if (!$isloaded(%file)) || (!$getpath(%file)) { return * $!error $+ : Invalid Parameters }
  winerr %file
  while (%g <= $line(@error,0)) {
    if (%error == 0) { %error.line = $calc(%g - 1) }
    if (*{* iswm $line(@error,%g)) { inc %error }
    if (*}* iswm $line(@error,%g)) { dec %error }
    inc %g
  }
  window -c @error
  return $iif(%error,%error - %error.line,%error)
}