Using mIRC 6.17 on Win XP SP2. No Scripts loaded.
I was trying to do $lines() of a file that was 33451 lines long (according to Textpad and Programmers Notepad), but mIRC returned 6029. With the help of the nice people on DALnet's #Scripting, they suggested I look for weird characters or control characters on that line. Sure enough, I found some control characters. I cleared that line, and ran the $lines again, and found another line. I did that again, again, and again. It eventually worked.
I took a look at the lines that mIRC was screwing up on, tried to find some points of commonality. Turns out, in each of those lines, the SUBstitue ASCII control character
(26) was used. My hypothesis is that mIRC thinks the file ends at the SUB, or mIRC can't handle it, so it ends the operation.
Here is a link
to the text file that contains the actual strings that mIRC was messing up that I pulled from the log file. Here
is a PNG of that text file.
I tested out my hypothesis with a new text file of 30 lines. The first 15 lines were normal text, the 16th line was a SUB, and 17-30 were normal text. As predicted, mIRC returned 15, when it should have done 30. The files used are here
(TXT) and image
Looking foward to mIRC 6.18.
Special thanks to Nimbus who gave me hosting to put these files up. He demands I put the below:
(12:03:04 am) « Nimbus » ;For Nimbus, for being such a good looking and caring on of a <censored>
(12:03:11 am) « Nimbus » son*
Upon further testing, it seems that mIRC has this flaw throughout the program. If a SUB is the 5th character on line 5 but i do something like /write -l10 <filename> asdf, it won't work. Instead mIRC will change the file so that lines 1-4 are writte, and the 4th character of the line 5 are written, stopping just before the SUB.