Page 1 of 1

Region Name strictly parsed; generates spurious error

PostPosted: December 27th, 2020, 12:19 am
by marktb1961
Vassal seems to be over sensitive about the contents of the Region field in "Send to Location" trait.

example; at a certain point (e.g. after a Refresh Counters but also in normal use), the following form of error will be generated if the Region field parses out to a value that does not equate to a valid Region name:
- Bad Data in Module: Recon in Force [Send to Location - Play multisection CC card in front of CiC] - Region not found Region[{ "CPCiC" + (OldMap=="Courier Rack" ? 1 : 2)}]= CPCiC2

My point is that there are valid reasons why the Region may not exist. My particular use case is a game with two map types, where one map type doesn't need the same Regions defining as in the other map type. I could quite easily make sure that the invalid Region name is never referenced (e.g. Restrict Commands).

The workaround is to ensure that any expression for a Region Name always generates a valid Region for any maps involved but I wonder why the Region name parsing is so strictly enforced.

Re: Region Name strictly parsed; generates spurious error

PostPosted: December 27th, 2020, 12:59 am
by m3tan
I find it useful because it identifies typos and other bugs in my buildfile that would otherwise go unnoticed as Vassal has no debug capabilities. That said it would be nice to disable these warnings type messages that aren't fatal errors.