mIRC Homepage
Posted By: onesikgypo little bug i have - probably an easy fix - 15/02/06 12:47 PM
hey got the following script but the $read bit doesnt seem to be working, basically if %x is already in the text file it shouldnt write it again, but it keeps on writing it

Code:
    if (!$read(listing $+ $replace($date,/,-) $+ .txt, w, * %x * )) {
  


im sure its something simple im missing

Edit: hixxy it actually isnt what your thinking, these are for "book packs" that we offer our customers.
Posted By: hixxy Re: little bug i have - probably an easy fix - 15/02/06 01:21 PM
Sorry but this forum doesn't help with filesharing.
View Edited
Posted By: hixxy Re: little bug i have - probably an easy fix - 15/02/06 03:50 PM
Right ok because of this thread I'm going to give you the benefit of the doubt.

You had more code than that in your original post and it showed that each line ended with pack: %x, therefore you should be using * %x as a wildcard instead of * %x * in the $read command.
Posted By: DaveC Re: little bug i have - probably an easy fix - 15/02/06 10:13 PM
if (!$read(listing $+ $replace($date,/,-) $+ .txt, w, $+(*,%x,*))) {
^ That would find any occurance of %x's contents in the file, however as hixxy said, if your actually looking for %x being on the end of the string with other words then a space before it its.
if (!$read(listing $+ $replace($date,/,-) $+ .txt, w, * %x)) {

Quote:
these are for "book packs" that we offer our customers.

Interesting reading these books are they?
© mIRC Discussion Forums