mIRC Home    About    Download    Register    News    Help

Print Thread
#151348 17/06/06 04:04 AM
Joined: Apr 2005
Posts: 7
D
damian Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2005
Posts: 7
I'm not sure if this is an actual bug, or some kind of processing order that hasn't been described in the help file, but here goes.

If you have a file (eg. tmp.txt) with the contents:
Code:
1
2
line3
line4

You cannot do $read(tmp.txt, 1) .. It'll return the second line (2) instead of the first (1). However, if you change around the file so it looks like this:
Code:
line1
line2
3
4

It will work perfectly if you $read(tmp.txt, 1).

Would anyone care to explain why this happens? I did a quick search through the forum before I wrote this just to see if anyone had brought it up before, it didn't come up with anything about it.

#151349 17/06/06 09:16 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
/help $read

Quote:
If the first line in the file is a number, it must represent the total number of lines in the file. If you specify N = 0, mIRC returns the value of the first line if it's a number.

If the t switch is specified then mIRC will treat the first line in the file as plain text, even if it is a number.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard