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

[ChatSetAttr][Pathfinder Roll20] Setting Buffs to Toggle Issue

I'm using ChatSetAttr to toggle buffs on and off using this command. !setattr --sel --repeating_buff_-N458LNESQMKKk9ClLd0_toggle|[[1-@{selected|repeating_buff_-N458LNESQMKKk9ClLd0_toggle}]] So this works well except in the case below.   Can anyone tell me what is wrong here and how I might fix it? Maybe a typo, but I've rewritten and triple checked it. !setattr --sel --repeating_buff_-N2O7MZT-pPeiT4F-ZG6_toggle|[[1-@{selected|repeating_buff_-N2O7MZT-pPeiT4F-ZG6_toggle}]] Maybe the hyphens in the row id?
Okay, weird.  I was searching around about this issue, saw that if you manually clicked the box, then shut and opened the sheet (not sure what that does), then tried the API again, it would work.  And it did.   I have no idea why it didn't work until I manually clicked the box.   So the code is good if anyone else follows this.
1657973564

Edited 1657973597
David M.
Pro
API Scripter
Huh. I was helping someone else with a repeating section issue (a scriptcard accessing inventory items on the 5e sheet) and found something similar & possibly related. The values for the item weight and # of items were not accessible by the api (i.e. reading "blanks") until the user actually typed in a value (even if it was the same as the value "printed" on the sheet). Once they did, that row's field was accessible even after a browser refresh. Weird.