mIRC Homepage
Posted By: s0urce Deleting line - 16/04/07 09:11 PM
if ($1 == .deny) {
$read(c:\users\matthew\rp.txt,s,$2)
write -dl$readn c:\users\matthew\rp.txt
}

Why doesn't this work?
Been working on it all day..
Posted By: Riamus2 Re: Deleting line - 16/04/07 09:14 PM
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
}
Posted By: s0urce Re: Deleting line - 16/04/07 09:21 PM
oh damn I feel dumb...
how would I do that noop thing?
I loooked at the help file?
/noop $rean
(just add in that line)?

Thanks for the help, works awesomely now
Posted By: PhantasyX Re: Deleting line - 16/04/07 11:56 PM
The /noop command just evaluates the line.
The purpose of $readn is to return the last line number that was read from a file. So in order to use the $readn in the script you are wanting he simply evaluated the $read() line to retrieve the number and basically set it so $readn will return that line number later in the script.

If you did do a /noop $readn nothing would happen. You can use /noop to evaluate identifers without having to run a command.

I hope this is what you're asking for?
Posted By: s0urce Re: Deleting line - 17/04/07 02:14 PM
Thanks PhantasyX That was a good explanation I could follow.

Posted By: Riamus2 Re: Deleting line - 17/04/07 05:18 PM
Sorry for the confusion. I included the noop in the code and was just telling you why.
© mIRC Discussion Forums