There are a bunch of things here that are probably causing that "Insufficient parameters" error, none of them are bugs though.
1. In mIRC 6.3 installations,
versions.txt is no longer in
$mircdir (unless you've upgraded an older version without changing it or explicitly made mIRC use the installation directory). This means that there's no file for
$read() to search and therefore you'll get the error. To be sure this isn't the problem, you should be using
$read($+($nofile($mircexe), versions.txt), s, Changes).
2. The search algorithm used by the
s switch matches from the start of the line only, and matches on whole words only, meaning that it will not match "Changes" because there is no line in
versions.txt that contains only the word "Changes" or "Changes" followed immediately by whitepace. As RusselB said, you should be matching against "Changes:" if you want to match the third line in the current
versions.txt, so the code should now be changed to
$read($+($nofile($mircexe), versions.txt), s, Changes:).
3. When using the
s switch,
$read() returns the remainder of the line. That is,
it only returns the part of the line after the search text. There is no line in
versions.txt that starts with the word "Changes:" (or "Changes") that has any text following it. Since there's no text following it,
$read() will return nothing. This is true any time that you use
$read() with the
s switch and the search text is an exact match for the whole line. So how do you know when it's matched? Using
$readn. So now, if we update the code one more time, we get this:
//echo -a $read($+($nofile($mircexe), versions.txt), s, Changes:) (line number: $readn $+ )And the result:
(line number: 3)Voila! It works fine. The moral of the story is that when using the
s switch with
$read(), you should always use
$readn to check if it has been successful.
Believe me, I realise the
s switch is confusing - especially since it's very different to how the
w switch works - but it's no bug.