Cargo rotation bug

Hello, this is problem I am facing in my latest vassal project. Game is called Switch&Signals and it is about trains carrying cargo. I want to make automatization on rotation of train acordingly to rails on map. I had made autorotation work for train, but when it gets cargo, Bug note apears.

Every rails are in Zone with zone property RotState

Train has Can rotate Trait with direct rotation to RotState number.

And there is key command applied to whole pieces on my map which set rotation directly to rotstate.
image

Cargo has only mat cargo trait.

When I try to move train with cargo - I get uncaught exception


The problem is your expression {$RotState$}; you’re combining both old-style and Beanshell syntax, when you need to pick one or the other: either

  1. {RotState} or
  2. $RotState$

You can use either, but Beanshell (the curly braces) is more flexible if you end up wanting a more complex expression (such as performing math on the value).

Oh, thanks, still get the same bug but you are right, I have corrected it.