I'm not sure if I understood your post. But all I'm seeing here are parenthesis mismatches.
Note that anything next to the closing paranthesis of an identifier (after it) is removed by the parser (for example, in "$window(*,0))()blah,123", ")()blah,123" is removed).
That said:
($eval - string going to be evaluated - identifier going to be evaluated)
$eval([color:green]($calc(1)),2)[/color] echoes "($calc(1))", which is fine;
$eval([color:green]( [color:blue]$calc(1) )[/color],2)[/color] echoes "( 1 )", which is fine;
$eval([color:green]( [color:blue]$calc(1))[/color],2)[/color] would be evaluated to $eval([color:green]( 1,1)[/color], which mismatches the parenthesis and breaks for invalid format;
$eval([color:blue] $calc(1))),2)[/color] echoes "1", which is fine;
$eval([color:green]if ((2 != [color:blue]$calc(1+1)) msg $chan The world is ending 1 plus 1 doesn't equal $calc(1+1)[/color],2)[/color]
..would be evaluated to..
$eval([color:green]if ((2 != 2 msg #blah The world is ending 1 plus 1 doesn't equal 2,1)[/color]
..which mismatches the parenthesis and breaks for invalid format.
So, unless you're meaning that $eval() shouldn't consider parenthesis mismatches, it seems all your examples are working as expected.
Last edited by cold; 20/09/03 03:35 PM.