mIRC Homepage
Posted By: RusselB Why doesn't this write the file? - 10/04/09 04:51 PM
Code:
on *:snotice:* did a /whois on you*:{
  var -s %file.log = $logdir
  var -s %file.log = $+(%file.log,$network)
  var -s %file.log = $+(%file.log,\whois.log)
  var -s %file.txt =  $2 $3 whoised $me on $date at $time
  .write %file.log %file.txt
}


The variables are all set correctly, but the actual file is not written.

Originally the code was
Code:
on *:snotice:* did a /whois on you*:{
  .write $+($logdir,$network,\whois.log) $2 $3 whoised $me on $date at $time
}

I added the variables and expanded it to try to figure out where it was failing for writing the file.

Figured it out.. forgot to allocate for the spaces in the directory name.
Posted By: DJ_Sol Re: Why doesn't this write the file? - 12/04/09 02:59 PM
Well I do see an extra space between = and $2.

You probably won't like my answer as it doesn't fix your issue, but the variable setting %file.txt is pointless. Why set a variable for something you need on the next line? Why not just:

.write %file.log $2 $3 whoised $me on $date at $time
Posted By: RusselB Re: Why doesn't this write the file? - 12/04/09 03:38 PM
As I stated, the only reason I went to the variables was to ensure that the information was being generated correctly.

the extra space is irrelevant, as the variables showed that the information I was wanting to use was being set correctly.
Posted By: Wims Re: Why doesn't this write the file? - 13/04/09 12:09 AM
Does the path contain space ? because mirc should display an error in that case and the dot you've put on the /write command would hide this error, use $qt in your path and see if this fix the problem
Posted By: RusselB Re: Why doesn't this write the file? - 13/04/09 02:47 AM
Obviously you didn't read the italicized message I added to my original post, as that is exactly the reason for the problem.
Posted By: argv0 Re: Why doesn't this write the file? - 13/04/09 03:26 AM
Obviously.
Posted By: Wims Re: Why doesn't this write the file? - 13/04/09 02:08 PM
Obviously the italicized message wasn't there when I've choose to answer your question...
Posted By: starbucks_mafia Re: Why doesn't this write the file? - 14/04/09 07:33 PM
It was there before anyone replied to the post. I saw it and left the thread alone.

It isn't too easy to spot though, kind of looks like a sig or something, maybe bold would've been clearer.
Posted By: Wims Re: Why doesn't this write the file? - 14/04/09 10:07 PM
Ok, it seems I don't see it, sorry
© mIRC Discussion Forums