Forum Discussion

FICO's avatar
FICO
Community Manager
14 years ago

Compile Error: Constant Expression Expected

Compile Error: Constant Expression Expected

I'm having an issue compiling a generated instance of a ruleset template.  It actually only seems to occur once I've created a rule inside the instance.  When I try to compile I always get this error.

Error: Constant expression expected

Clicking on the error pulls up the rule inside the ruleset instance, but doesn't highlight anything as being the problem.  I've tried tons of things to narrow it down, everything from the rule being a simple...

if(true) then { return; }

... to not even having any SRL in the rule.

I have a feeling it may be the rule name, but I've changed it to something completely random to garauntee uniqueness, but I still get the same error.  Has anyone here ran into this error?

Best Regards

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    Did you have any luck solving this?

    If not, have you checked any priority settings where placeholders are used, etc? Those probably want a constant. Also, you might run into issues like that when using objects. I haven't used them much, but seem to recall that there were some limitations to using them.

    Regards,

    Jostein

  • FICO's avatar
    FICO
    Community Manager

    Have you tried the solutions from this topic:

    http://discuss.fico.com/t5/FICO-Blaze-Advisor-Discussion/Compile-Error-Constant-Expression-Expected/m-p/2888

    The solution there is he forgot the single quotes around the dates for from/to dates.

    It worked for me!