Trigger condition using numPieces broken in 3.1.4 !

Well …

This error occurs in 3.1.4, but not in 3.0.17

Using a Trigger condition based on cards in a deck :

$MyDeck_numPieces$<7

The condition does not apply with 3.1.4 … even if reached

The same condition works in 3.0.17 …

I can provide the game module if necessary.

Regards,

Grégory

Yes please, can’t debug without it.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent,

PM sent … with how to reach the component used and the module link

Regards,

Grégory

Grégory,

We must have been over this exact same point in the forums at least 3 times since 3.1 came out.

The Property Match expression

$MyDeck_numPieces$<7

is WRONG. The fact that it worked in 3.0 was a BUG that was fixed in 3.1.

The left-hand side of a property Expresion is ALWAYS evaluated as a property name. The ‘$’ signs force an additional level of evaluation before the expression is checked.

Therefore, if the number of pieces in the Deck is 0, then after the $ evaluation, the expression looks like this:

0<7

Now comes the property evaluation and Vassal goes and looks for a property named ‘0’ and gets the value of it. Since it does not exist, it returns nothing and the test fails.

The correct way to write a basic, simple Property Match Expression is to NEVER put $ signs on the left-hand side. It should look like this:

MyDeck_numPieces<7

Unless you are trying to doing something really tricky, your property conditions should all look like this:

MyDeck_numPieces<7

or this:

MyDeck_numPieces<$variableName$

Never this:

$MyDeck_numPieces$<7

B.

*********** REPLY SEPARATOR ***********

On 11/05/2009 at 9:27 PM soft-bug wrote:


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent,

First thank you for your reply …

Second, sorry to disturb … but it’s not easy to understand technical Vassal English wording and to follow all errors or news …

Since 3.1.0 … i do not understand half of the technical Vassal improvements … It’s like chenese for me …

I will try to get more documentation next time…

Grégory

On May 11, 2009, at 9:50 PM, Brent Easton wrote:

I just updated the FAQ discussion about this at

vassalengine.org/wiki/doku.p … omparisons


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)