i keep getting this error

/did: invalid parameters (line 35, errormsgs)

here is the code that i have copyed and changed what did I do wrong


Code:
 
on 1:SOCKREAD:update: {
  sockread -f &data
  bwrite update.txt -1 -1 &data  
  ; speeds up things so we dont have to wait for the socket to close..  
  .timerver 1 1 update.close
}
alias update.close {
  if ($isFile(update.txt)) {
    var %lastline = $read(update.txt, $lines(update.txt))
    .remove update.txt
  } 
  else update %lastline = Could not download file.
  did -ra versioncheck 1 %lastline
}
alias checkver { sockopen update host.com 80 }