# I think I found a bug in 3.2.5

**URL:** <https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000>\
**Category:** General Discussion\
**Created:** [May 23, 2013, 2:57am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000 "2013-05-23T02:57:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![airjudden](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@airjudden](https://forum.vassalengine.org/u/airjudden)\
**Post date:** [May 23, 2013, 2:57am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/1 "2013-05-23T02:57:36Z")

</div>

I have a module I have been using.

It uses a “Set Global Property” that Sets the variable value directly to “($DrawDeck\_numPieces$)” (no quotes) and displays this variable for all to see in their private windows.

Now with 3.2.5, it can no longer read \_numPieces. I uninstalled 3.2.5, went back to 3.2.2 (the last version I had) and it worked.

Thought you might want to know this.

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [May 23, 2013, 3:26am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/2 "2013-05-23T03:26:33Z")

</div>

Could you please try the latest development release (VASSAL-3.2.6-svn8721) available from [vassalengine.sourceforge.net/builds/](http://vassalengine.sourceforge.net/builds/) and see if this resolves the problem. This has bug fixes in a closely related area that will hopefully fix your problem also.  
Thanks,  
Brent.

---

<div class="post-metadata">

**Author:** ![airjudden](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@airjudden](https://forum.vassalengine.org/u/airjudden)\
**Post date:** [May 23, 2013, 3:35am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/3 "2013-05-23T03:35:23Z")

</div>

OK, will try. Sorry I didn’t see it before, but I cross-posted this to " Technical Support & Bugs" once I realized there was a better forum for the topic, and I provided my system data and the steps used to create the problem.

---

<div class="post-metadata">

**Author:** ![airjudden](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@airjudden](https://forum.vassalengine.org/u/airjudden)\
**Post date:** [May 23, 2013, 3:40am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/4 "2013-05-23T03:40:09Z")

</div>

It worked.

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [May 23, 2013, 3:45am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/5 "2013-05-23T03:45:25Z")

</div>

The reason is that {$variable$} is actually incorrect, it should be {variable}, but the earlier versions of Vassal 3.2 supported it, purely by accident. Bug fixes in 3.2.5 removed the support. We have added support for it back in to 3.2.6.

---

<div class="post-metadata">

**Author:** ![airjudden](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@airjudden](https://forum.vassalengine.org/u/airjudden)\
**Post date:** [May 23, 2013, 4:30am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/6 "2013-05-23T04:30:29Z")

</div>

Question…

I thought numPieces wasn’t a variable, but rather, some sort of property. Here is my logic.

When you said the $ was incorrect, I use the numPieces in a text box elsewhere, and in that textbox, I tried typing without the dollar signs:  
Cards left = {RomeDraw\_numPieces}

And it literally posts that message.

But if I wrap RomeDraw\_numPieces in $ signs, then it works and says something like:  
Cards left = 15

Therefore, I concluded that numPieces was a type of property (sorry, I don’t know Java, so I don’t know the proper lingo), and that it’s not like the variables that I set up in the Global Properties section.

Therefore, when I was in the Set Global Property section, and I went to type in the value for the “New Value” field, I clicked the black box on the right (that looks like a calculator), and it gave me the Expression Builder pop-up box. There, I copied what I had in the earlier text box, which was $DrawDeck\_numPieces$, and when I clicked “OK”, it put the brackets around it.

Not saying I’m right, because I’m not, and I obviously don’t know Java. I’m just saying it’s probably a good idea to put that support in 3.2.6 because it can be mighty confusing.

I guess my question is: is \_numPieces really a variable just like the ones created in Global Properties and is treated the same in all usage?

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [May 23, 2013, 4:49am UTC](https://forum.vassalengine.org/t/i-think-i-found-a-bug-in-3-2-5/6000/7 "2013-05-23T04:49:31Z")

</div>

> [@](#):
>
> I guess my question is: is \_numPieces really a variable just like the ones created in Global Properties and is treated the same in all usage?

Yes, RomeDraw\_numPieces is a global property that is created by the Deck named RomeDraw and can be used just like any other Global property, except that it’s value cannot be set.

> [@](#):
>
> Cards left = {RomeDraw\_numPieces}

Again, this usage is completely incorrect and it is amazing that it produced anything sensible at all before. Again, it was just by chance. The correct expression is {"Cards left = "+RomeDraw\_numPieces}

Prior to Version 3.2, support for the display and reference of properties was quite ad hoc. The notation $variable$ was added to Report Action and Auto-move formats to allow pre-defined values like $playerSide$, $locationName$ etc. This was later expanded to allow reference to any Global property. Each field that allowed $variable$ to be used had to be specifically programmed to accept it, and it was not obvious which fields allowed it and which did not.

In 3.2 we added the concept of a Calculated Expression. Expressions look like this

{}

i.e. completely surrounded by a single pair {}. Fields that allow an Expression to be entered are clearly identified by the small calculator Icon after them.
