mIRC Home    About    Download    Register    News    Help

Print Thread
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.

Joined: Jan 2007
Posts: 1,156
D
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

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.

Joined: Jul 2006
Posts: 4,186
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,186
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.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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.

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Jul 2006
Posts: 4,186
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,186
Obviously the italicized message wasn't there when I've choose to answer your question...


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 2,962
S
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.
Joined: Jul 2006
Posts: 4,186
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,186
Ok, it seems I don't see it, sorry


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard