Create account / Log in

Dice Component Reporting Bug

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Dice Component Reporting Bug

Postby DrNostromo » September 6th, 2016, 8:05 pm

I found a bug in the Dice Component reporting system for Vassal 3.2.16. Basically, it reports the roll before the roll is actually made.

I've attached a sample mod to demonstrate the bug. It's simply a button that will generate a D20 roll.

First the dice component will report the roll and then there's a report trait on the button itself that will report the roll.

On the first click, the dice component will always report a 1 and the button will report the actual roll. For this example, we'll say it says 15.

On the second click, the dice component will report the roll as 15 (the last roll) and the button will report the new roll.

It took a long time for me to finally figure this out. I was going bonkers trying to find out why the results of my calculated expressions weren't coming out right based on the reported die roll results.

Just change the .ZIP extension to .VMOD
Attachments
DiceReportBug.zip
(5.58 KiB) Downloaded 91 times
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Dice Component Reporting Bug

Postby Malnorma » September 7th, 2016, 2:03 am

Use $result$ in the dice component report string, instead of $D20_result$. I believe $D20_result$ is the global result variable that may not actually be set at the time the dice report occurs.
Malnorma
 
Posts: 124
Joined: October 14th, 2015, 9:26 am


Return to Technical Support & Bugs

Who is online

Users browsing this forum: No registered users and 1 guest