mIRC Home    About    Download    Register    News    Help

Print Thread
#2608 19/12/02 08:02 PM
Joined: Dec 2002
Posts: 1
K
Kiichan Offline OP
Mostly harmless
OP Offline
Mostly harmless
K
Joined: Dec 2002
Posts: 1
the t flag to ignore the fact that the first line is or has a number in it doesnt work. $read(text.txt,t,0) returns the first line.

first few lines of the text file used:
Array[y+=1] = new sElement('Actual Price',x+=1,'98','Acorn')
Array[y+=1] = new sElement('Actual Price',x+=1,'1000','Adventure Suit')
Array[y+=1] = new sElement('Actual Price',x+=1,'360','Aloe Leaflet')

#2609 20/12/02 01:41 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
From /help $read:

  • $read(filename, [ntsw], [matchtext], [N])
    Returns a single line of text from a file.

    ...

    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.

This looks like it is following expected behaviour based on what's in the help file. Why would you start reading using $read( , ,0) anyway? Why not just use $read( , ,1)?


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard