mIRC Home    About    Download    Register    News    Help

Print Thread
$hash() * Break: evaluation error #263957 15/10/18 07:51 AM
Joined: Jan 2004
Posts: 1,435
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,435
Invalid $hash() syntax as a parameter to /commands or other $identifiers often generates errors, primarily the confusing message:

* Break: evaluation error

Returning the above error sometimes is also triggered by an unrelated string following the identifier:

//echo -a $base($hash(abc),36,10)
//echo -a $left($hash(abc),2)
//echo -a $sha1($hash(abc)) x
//echo -a $ansi2mirc($hash(abc)) x
//clipboard $hash(abc) x
//echo -a $len($hash(abc)) x

Returning 'abc' following the identifier's expected output:

//echo -a $len($hash(abc))
Return: 0 abc
//echo -a $sha1($hash(abc))
Returns: da39a3ee5e6b4b0d3255bfef95601890afd80709 abc
(this output is the same as $sha1($null)

//echo -a $iif($hash(abc),true,false)
Returns: * /if: invalid format

-

Fix could either be to have a default B value when B isn't used like the default N for $sha1, or to have this return the same $null as when using B=33.

Re: $hash() * Break: evaluation error [Re: maroon] #263959 15/10/18 09:03 AM
Joined: Dec 2002
Posts: 4,839
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,839
Thanks, this was due to a bug in how the hash identifier was being parsed. This issue has been fixed for the next version.