Carcassonne error in Vassal 3.5.5

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.

Just tried the exact same module in 3.3.2, and it works fine. I don’t argue that that expression shouldn’t have worked, but it used to! LOL

Edit: Just tried 3.4.12, and it errors there, so apparently it stopped working around 3.4.x.

I’ll try this solution and tell you the result soon. Thank you very much for your help!

The expression error doesn’t show anymore, but it seems like I still don’t get any of the expansion tiles in my tiles deck…

You will have to dig deeper. I suspect there is no property named ‘Setup Window’. You will need to work out what that is supposed to be.

I took a quick peek in the module, searching in the Editor, and the actual original expression is:

 { tile_from == $ExpLbl$ && $CurrentMap$ == "Setup Window" } 

Dunno if that is something where the parsing logic has changed since the 3.3.2 days, Brent?

It looks like what’s probably needed is more like:

 { tile_from == ExpLbl && CurrentMap == "Setup Window" } 

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 :open_mouth: 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.


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?

So, it’s another case of an old module having extraneous $-signs around the property names, which 3.3 and before ignored, but are now causing issues.