mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Dec 2002
Posts: 5,486
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,486
Thanks, this was due to a bug in how the hash identifier was being parsed. This issue has been fixed for the next version.


Link Copied to Clipboard