Counting Cards left in a deck


I’m pretty new to this. I am trying to determine how many cards are left in a deck.

I searched this forum and saw this post:

I went to my Map Window and created an At-Start Stack.

Beneath it, I told it “Add Single Piece”

From there, I created a Text Label. When I opened it up, I went to the second field (“Text”) and typed:
Cards Remaining = $JapanDrawDeck_numPieces$

Because the deck I am counting is called “JapanDrawDeck”

Then I went into that deck, and checked the box “Perform counting of property expressions?”

It opened up a section title “Expressions to count”

I tried these:

And each time, I clicked “Add”

When I run the module the text box says "Cards Remaining = "

When I go back to the deck property and open it, the “Expressions to count” is blank. The “Perform counting of property expressions?” is still checked, though.

I am on Windows 7 and VASSAL 3.2.2 if that helps.

Any idea what I am doing wrong or need to do?


That is correct. You do not need to add any expressions to count.

Your problem may be where the deck is located. numPieces will only works on the same map as the text lablel. Is the At-Start Stack on the same map window as the card deck?

That solved it! Thanks so much!