mIRC Home    About    Download    Register    News    Help

Topic Options
#229939 - 20/02/11 03:31 PM [BUG]: $lines bug
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
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!
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#229942 - 20/02/11 05:18 PM Re: [BUG]: $lines bug [Re: westor]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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.

Top
#229944 - 20/02/11 06:10 PM Re: [BUG]: $lines bug [Re: RusselB]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Well i tryied but same result was returned (0)

The issue is still exist
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#229945 - 20/02/11 07:05 PM Re: [BUG]: $lines bug [Re: westor]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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?
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#229949 - 20/02/11 07:43 PM Re: [BUG]: $lines bug [Re: starbucks_mafia]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
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


Edited by westor (20/02/11 07:55 PM)
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#229950 - 20/02/11 07:54 PM Re: [BUG]: $lines bug [Re: westor]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
In your code, the line

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

should be:

if (![color:green]$isfile(%f)) { d_min $dname | [/color][...]
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#229951 - 20/02/11 07:56 PM Re: [BUG]: $lines bug [Re: starbucks_mafia]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Yes problem solved, thanks didn't mind the $isfile identifier

- You can delete this thread
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top