I get this expression error every time I want to add Carcassonne expansions to the table.
Bad Data in Module: Expression evaluation error Expression={tile_from == ic && Setup Window == “Setup Window”}, Error=
The tile_from can be any expansions and it will still produce this error.
This error makes me unable to use tiles from most expansions. Is there any way to fix this? Or do I need to downgrade my version of Vassal to match Carcassonne’s version compatibility?
Your problem is in trying to use a property with a space in it. If you must have a property with a space in it (Not recommended), then you can only use it in a beanshell expression like this:
{tile_from == ic && GetProperty("Setup Window") == "Setup Window"}
Weird, I don’t recall that error occurring last time I tried the module (which was quite a while ago; probably VASSAL 3.3, possibly 3.4), but it definitely occurs with 3.5.5! I’ll do a quick update to the module to fix the error in a few days, if someone else doesn’t get to it first.
That particular Beanshell can never have worked on any version of Vassal. Something else has changed. Either the Beanshell has been changed, or it was not being called before.
Or theoretically
"$CurrentMap$" == "Setup Window"
would likely work but I wouldn’t encourage it. I’m only assuming that the tile_from part of the expression ought to get corrected too.
Of course with expressions like this, I’d be worried that other things are wrong in the module too I shudder at the thought that the original line either “worked” or “looked like it worked”! I guess there’s always the possibility that it didn’t work but didn’t error, and the module designer didn’t notice and didn’t pursue? Hard to say without contacting them.
Brian
p.s. Brent I feel like maybe we’ve already discussed and it was too hard to retrieve and display the “actual original beanshell expression” (in addition to the substitutions-made version) at the time of displaying the error?