You need a space before $readn. You should also use the /noop command to prevent $read from doing anything other than getting the line number.

Code:
if ($1 == .deny) {
  noop $read(c:\users\matthew\rp.txt,s,$2)
  write -dl $readn c:\users\matthew\rp.txt
}