vassalengine/vassal

Loop counter flaw

Opened this issue · 0 comments

Vassal does not allow the use of an identical loop property name in serially executed components. Attempts to do this result in infinite loop exception, even though no such thing is occurring (at least at the level of the module's logic).

This applies to Trigger Action trait and Action Button component, both of which allow this, for example:
image

In this example if another Trigger Action trait is defined on the same piece, also using "col" as the loop property, an infinite loop exception will occur when the loop is action - even when just one of the Trigger Action traits is triggered.

Workaround: specify different names for loop properties. However, this further complicates logic that the module designer may be trying to reference from both loops, using the loop property.