# Calculated property gives error but works...

**URL:** <https://forum.vassalengine.org/t/calculated-property-gives-error-but-works/5186>\
**Category:** Module Design\
**Created:** [August 9, 2012, 1:49pm UTC](https://forum.vassalengine.org/t/calculated-property-gives-error-but-works/5186 "2012-08-09T13:49:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![inSane](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/i/47e85d/32.png) [@inSane](https://forum.vassalengine.org/u/inSane)\
**Post date:** [August 9, 2012, 1:49pm UTC](https://forum.vassalengine.org/t/calculated-property-gives-error-but-works/5186/1 "2012-08-09T13:49:34Z")

</div>

Hi,

To count gamepieces in a deck I use a dummy piece with a textlabel $\_numPieces$ but this counts also the dummy piece.  
So I add a calculated property in the dummy piece with name ‘HowManyCards’ and expression $\_numPieces$-1 and put $HowManyCards$ in the textlabel. The count works and is correct but I get

Bad Data in Module: Expression evaluation error chit-woodback-Calculated Property[HowManyCards]={$Wood\_numPieces$-1}, Error= inline evaluation of: ``\_xyzzy=\_plugh();’’ internal Error: Unimplemented binary String operator

in the log window. Can I just ignore this because it works or will I end up with even more problems? Is there another way to count the pieces in my deck (without an at-start-stack underneath)?

tia

---

<div class="post-metadata">

**Author:** ![Tim\_M](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/tim_m/32/2_2.png) [@Tim\_M](https://forum.vassalengine.org/u/Tim_M)\
**Post date:** [August 10, 2012, 2:01pm UTC](https://forum.vassalengine.org/t/calculated-property-gives-error-but-works/5186/2 "2012-08-10T14:01:25Z")

</div>

Dont put your dummy piece in the deck. Keep it on the same map though off to side somewhere
