mIRC Home    About    Download    Register    News    Help

Print Thread
Why doesn't this write the file? #211281 10/04/09 04:51 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: Why doesn't this write the file? [Re: RusselB] #211334 12/04/09 02:59 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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

Re: Why doesn't this write the file? [Re: DJ_Sol] #211335 12/04/09 03:38 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: Why doesn't this write the file? [Re: RusselB] #211345 13/04/09 12:09 AM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
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

Last edited by Wims; 13/04/09 12:11 AM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Why doesn't this write the file? [Re: Wims] #211349 13/04/09 02:47 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Obviously you didn't read the italicized message I added to my original post, as that is exactly the reason for the problem.

Re: Why doesn't this write the file? [Re: RusselB] #211350 13/04/09 03:26 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Obviously.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Why doesn't this write the file? [Re: RusselB] #211360 13/04/09 02:08 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
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
Re: Why doesn't this write the file? [Re: Wims] #211400 14/04/09 07:33 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: Why doesn't this write the file? [Re: starbucks_mafia] #211405 14/04/09 10:07 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Ok, it seems I don't see it, sorry


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net