Error message for uncalled send-to-location trait

I’ve encountered a vassal problem. I have a windows 11 64 bit computer, and I’m using vassal 3.8.0, but I saw the problem too with the previous version. I have not tested with earlier vassal versions.

I have a deck of tech tiles on a map called Tech. During game setup, I deal out 3 random tech tiles to a faceup display in Tech via 3 send-to-location commands: goSpace1, goSpace2, and goSpace3. A player can buy one of the tiles and move it to his player map window (e.g. “Red”). It joins his common tiles. The player map has an irregular grid. One region point is called “a1”. All tiles of this type have a command (^W) to send it to “a1,” which is a region that does not exist in the Tech window. I have a restricted command trait that hides ^W if it is not on a player map, i.e. it’s still on the Tech map. So far, so good.

I start a new game. The mod deals the first tech tile via goSpace1. It works, but I get this message:

Bad Data in Module: Piece: tech7 Trait: Send To Location - Go to Wheel => Ctrl+W Source: Region[{“a1”}]=a1 Error: Region not found.

This is an error message for a command that no one called.
“tech7” is the tech tile’s name, a random selection. “Go to Wheel” is the menu command for ^W. “goSpace1” has nothing to do with ^W other than the goSpace commands and ^W are traits in a tech tile. This should not be happening. Here’s the ^W command breakdown:

Send to location trait. “Go to Wheel”, control-W. Region on selected map. {CurrentMap}, region={“a1”}

I get the message only once, the first time I issue goToSpace1 and not for the others. If I undo and redo, I don’t get the message. I have to restart a new game to get the message. It sounds like I have a spurious ^W while the tech tile is on the Tech map, but that should be impossible because I have restricted the command to prevent this.

I added a report trait on ^W to see what CurrentMap was, and I made sure I checked override. The report never appears. I then duplicate the ^W trait and put the new command below the ^W one. I change the menu command and the ^W to a named command: gotohell. I start a game, and the error message complains about “gotohell,” which is never called.

I then change {CurrentMap} to {“Red”} in the ^W trait. I don’t get a message, but the tile doesn’t go to Red either. I smell a preprocessing rat.

If vassal could talk, I think it would say this: “Stan, I did goSpace1 as you asked, but as a courtesy I checked the syntax of another send-to-location in that piece. It looked suspicious because the Tech map doesn’t have an “a1” region. Just saying. I’m going to report this only once for your convenience. You can thank me later.”

Oddly enough, I had an earlier version of this mod where it didn’t complain. It happened only after I added a couple of lines unrelated to the scenario, and it continued even after I backed them out. It’s like I woke it up.

I think I can get around it, but it’s the kind of thing that would drive others nuts. Joel Toeppen in another thread complained about something vaguely similar, but his problem vanished when he did undo-redo. Maybe they are related. I can provide a stripped down vmod if someone wants to explore, but I’m not going to do it unless someone asks.

Oh, by the way, I see 3.8 lets me control movement via a property, but I don’t see how to do that. I don’t see anything new in does-not-stack.