mIRC Home    About    Download    Register    News    Help

Print Thread
#141090 04/02/06 03:42 PM
Joined: Feb 2006
Posts: 8
F
FLyFLu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: Feb 2006
Posts: 8
why when i type
.Yo Mamma Kick:/kick # $$1 $read -r $mircdir\data\Yomamma.txt
In popup and i kick anyone ,in chanel say this :
* $read: invalid parameters
What i do to work this ?
P.S sorry for bad en

#141091 04/02/06 05:13 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Your understanding of the $read identifier seems to be off. This is directly from the help file. Compare the examples to what you're trying to do and it should be obvious what is wrong in your code.

Quote:
$read(filename, [ntswrp], [matchtext], [N])
Returns a single line of text from a file.

This identifier works in conjunction with the /write command.

//echo $read(funny.txt)

Reads a random line from the file funny.txt.

//echo $read(funny.txt, 24)

Reads line 24 from the file funny.txt.

//kick # $1 $read(kicks.txt)

Reads a random kick line from kicks.txt and uses it in the kick command.

//echo $read(info.txt, s, mirc)

Scans the file info.txt for a line beginning with the word mirc.

//echo $read(help.txt, w, *help*)

Scans the file help.txt for a line matching the wildcard text *help*. The r switch implies a regex match.

If you specify the s, w, or r switches, you can also specify the N value to specify the line you wish to start searching from in the file, eg.:

//echo $read(versions.txt, w, *mirc*, 100)

If the n switch is specified then the line read in will not be evaluated and will be treated as plain text.

If the p switch is specified, command | separators are treated as such instead of as plain text.

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.


Link Copied to Clipboard