mIRC Homepage
Posted By: westor [BUG]: $lines bug - 20/02/11 03:31 PM
Hello,

I have see that is maybe an mIRC bug when i start making an addon, when it return wrong number of lines on an specific file, i don't know what exactly it is maybe i make something that is wrong, please help to find an solution.

check this image to see the bug:

Direct link: http://img525.imageshack.us/img525/7121/mircbug.png



- Thanks!
Posted By: RusselB Re: [BUG]: $lines bug - 20/02/11 05:18 PM
One possibility that occurs to me, is that the $scriptdir path may have spaces in it, thus try changing your line 718 to
Code:
var %f = $qt($scriptdirinfo.txt)
then try your script again.
Posted By: westor Re: [BUG]: $lines bug - 20/02/11 06:10 PM
Well i tryied but same result was returned (0)

The issue is still exist
Posted By: starbucks_mafia Re: [BUG]: $lines bug - 20/02/11 07:05 PM
It's important to point out that you're not confirming the existence of the file in that code. Your use of if (!%f) { ... } merely checks that the text of the filename is not 0/$null (and is therefore redundant since obviously it can't be as the variable is set in the previous line).

If you actually check for the file's existence in that code with $isfile(%f) does it say the file exists?
Posted By: westor Re: [BUG]: $lines bug - 20/02/11 07:43 PM
Originally Posted By: starbucks_mafia
It's important to point out that you're not confirming the existence of the file in that code. Your use of if (!%f) { ... } merely checks that the text of the filename is not 0/$null (and is therefore redundant since obviously it can't be as the variable is set in the previous line).

If you actually check for the file's existence in that code with $isfile(%f) does it say the file exists?


Yes you're right problem solved!, thanks
Posted By: starbucks_mafia Re: [BUG]: $lines bug - 20/02/11 07:54 PM
In your code, the line

if (![color:red]%f) { d_min $dname | [/color][...]

should be:

if (![color:green]$isfile(%f)) { d_min $dname | [/color][...]
Posted By: westor Re: [BUG]: $lines bug - 20/02/11 07:56 PM
Yes problem solved, thanks didn't mind the $isfile identifier

- You can delete this thread
© mIRC Discussion Forums