mIRC Home    About    Download    Register    News    Help

Print Thread
$findfile both $4 and $5 are non-numeric #264595
18/12/18 10:11 PM
18/12/18 10:11 PM
Joined: Jan 2004
Posts: 1,158
maroon Offline OP
Hoopy frood
maroon  Offline OP
Hoopy frood

Joined: Jan 2004
Posts: 1,158
$findfile's combo of non-numeric $4 and $5 causes $5 to be ignored, in favor of using $4 as the /command parameter. However a non-numeric $4 becomes a /command parameter without benefit of $1- or $parms, and $5 seems completely ignored. If $5 contains $my_identifier it doesn't get triggered. Whichever is most backwards compatible, this should either be invalid syntax or $4 should be given the $1- and $parms:

Code:
//echo -a $findfile($mircdir,*.ini,0,echo 3 -a test $1 vs $parms,echo 4 -a test $1 vs $parms)



Because $4 is not seeing the $1-, having $4 being "@window $1-" is not being handled as if invalid syntax:

Code:
//window -c @test | window -e2l40 @test | echo -s test $findfile($mircdir,*.ini,0,@test $1-)
vs
//window -c @test | window -e2l40 @test | echo -s test $findfile($mircdir,*.ini,0,@test $1-,noop)


Re: $findfile both $4 and $5 are non-numeric [Re: maroon] #264599
19/12/18 10:04 AM
19/12/18 10:04 AM
Joined: Dec 2002
Posts: 4,449
London, UK
Khaled Offline

Planetary brain
Khaled  Offline

Planetary brain

Joined: Dec 2002
Posts: 4,449
London, UK
Thanks for your bug report. This is difficult to solve becuase the $findfile() identifier was extended multiple times to handle extra features which required that it handle a variable number of parameters. Changing the way it works now would very likely break existing scripts. It should definitely not issue an error message, as that would break backwards compatibility, and it should not be passing/evaluating parameters that it was not meant to pass.