Create account / Log in

Carcassonne error in Vassal 3.5.5

Support for existing Vassal modules. Ask here if you need help with a specific module.

Moderators: uckelman, Tim M

Carcassonne error in Vassal 3.5.5

Postby Atherys » May 2nd, 2021, 8:20 pm

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?
Atherys
 
Posts: 3
Joined: May 2nd, 2021, 8:04 pm

Re: Carcassonne error in Vassal 3.5.5

Postby Brent Easton » May 4th, 2021, 1:45 am

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:

Code: Select all
{tile_from == ic && GetProperty("Setup Window") == "Setup Window"}
User avatar
Brent Easton
 
Posts: 3395
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Carcassonne error in Vassal 3.5.5

Postby jrwatts » May 4th, 2021, 2:48 am

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.
jrwatts
 
Posts: 334
Joined: April 29th, 2020, 10:30 pm

Re: Carcassonne error in Vassal 3.5.5

Postby Brent Easton » May 4th, 2021, 2:53 am

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.
User avatar
Brent Easton
 
Posts: 3395
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Carcassonne error in Vassal 3.5.5

Postby jrwatts » May 4th, 2021, 3:29 am

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.
jrwatts
 
Posts: 334
Joined: April 29th, 2020, 10:30 pm

Re: Carcassonne error in Vassal 3.5.5

Postby Atherys » May 4th, 2021, 6:39 am

Brent Easton wrote: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:

Code: Select all
{tile_from == ic && GetProperty("Setup Window") == "Setup Window"}


I'll try this solution and tell you the result soon. Thank you very much for your help!
Atherys
 
Posts: 3
Joined: May 2nd, 2021, 8:04 pm

Re: Carcassonne error in Vassal 3.5.5

Postby Atherys » May 4th, 2021, 8:45 pm

Brent Easton wrote: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:

Code: Select all
{tile_from == ic && GetProperty("Setup Window") == "Setup Window"}


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...
Atherys
 
Posts: 3
Joined: May 2nd, 2021, 8:04 pm

Re: Carcassonne error in Vassal 3.5.5

Postby Brent Easton » May 5th, 2021, 1:20 am

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.
User avatar
Brent Easton
 
Posts: 3395
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Carcassonne error in Vassal 3.5.5

Postby Cattlesquat » May 5th, 2021, 2:00 am

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

Code: Select all
 { 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:

Code: Select all
 { tile_from == ExpLbl && CurrentMap == "Setup Window" }


Or theoretically
Code: Select all
"$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 :O 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?
User avatar
Cattlesquat
 
Posts: 1141
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Carcassonne error in Vassal 3.5.5

Postby jrwatts » May 5th, 2021, 5:08 am

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.
jrwatts
 
Posts: 334
Joined: April 29th, 2020, 10:30 pm


Return to Module Support

Who is online

Users browsing this forum: No registered users and 1 guest