Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Attribute BUG

I have a value for an attribute = 2 but the Roll20 Client still sees it as '0' when I reference it in a macro for the API. Eg If am passing something like this to the API [[@{Damage}+@{DamageBonus}]] where the attribute called 'Damage' = 1d6 & the attribute called 'DamageBonus' = 2. In the msg.inlinerolls it is telling me in the API console that the expression = "1d6+0" even though I can retrieve the attribute 'DamageBonus' & get a value of '2'. The msg.expression should be "1d6+2" It seems like the Roll20 Client is not passing the correct information even though it is correct in the character's attributes and it is correct when I retrieve the attribute from within the API.
Try doing a parseInt() on the variable.
HoneyBadger said: Try doing a parseInt() on the variable. The problem is on the client side HoneyBadger. I can get the correct value from within the API using parseInt()
Check for spaces in the attribute then.
The attribute has no spaces. attribute name = DamageBonus I have had a similar problem to this in the past which Riley fixed.
I have also checked for a duplicate attribute which might be causing the problem.
For now I have modified my script and I will retrieve the attributes for the relevant characters from within the API. I just wanted the Dev's to be aware of the issue.
1403660876

Edited 1403661015
There are definitely gremlins at work in the 'abilities' for characters. If I update an ability on a character and click the tick it will still treat it as though the ability has not been changed. Could someone please take a look at this? If the ability is brand new then I have no issue, it is only when I try and modify an existing ability. Edit: It must be server lag. The change was eventually effective after 2 minutes. This may have something to do with the number of character's & abilities that I have for each character in my campaign? Too much stress on the system?
You mean there was lag between when you changed it in-game and when it showed up us changed in the API?
When I change the attribute value for a character in Roll20 it shows the correct value for the atrribute in the 'attributes & abilities' tab. The API recognizes the change if I extract the attribute value from the character using the API. If I try and pass the value through to the API from the Roll20 client then the change is not recognised.