mIRC Home    About    Download    Register    News    Help

Topic Options
#211281 - 10/04/09 05:51 PM Why doesn't this write the file?
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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.

Top
#211334 - 12/04/09 03:59 PM Re: Why doesn't this write the file? [Re: RusselB]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
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

Top
#211335 - 12/04/09 04:38 PM Re: Why doesn't this write the file? [Re: DJ_Sol]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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.

Top
#211345 - 13/04/09 01:09 AM Re: Why doesn't this write the file? [Re: RusselB]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3496
Loc: France
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


Edited by Wims (13/04/09 01:11 AM)
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#211349 - 13/04/09 03:47 AM Re: Why doesn't this write the file? [Re: Wims]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Obviously you didn't read the italicized message I added to my original post, as that is exactly the reason for the problem.

Top
#211350 - 13/04/09 04:26 AM Re: Why doesn't this write the file? [Re: RusselB]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
Obviously.
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#211360 - 13/04/09 03:08 PM Re: Why doesn't this write the file? [Re: RusselB]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3496
Loc: France
Obviously the italicized message wasn't there when I've choose to answer your question...
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#211400 - 14/04/09 08:33 PM Re: Why doesn't this write the file? [Re: Wims]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#211405 - 14/04/09 11:07 PM Re: Why doesn't this write the file? [Re: starbucks_mafia]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3496
Loc: France
Ok, it seems I don't see it, sorry
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top