Closed phylll closed 3 months ago
Via experimentation: The non-token formula
-bearing entry works if you do pass an intentionally invalid token for it, like so (...using two entries here so you can meaningfully click through the rounds):
!mmm do settracker({formula: "+1", title: "Runde", value: 0, token: "blah"}, {formula: "+2", title: "Doppelrunde", value: 0, token: "blubb"})
No, it doesn't make sense. I'll guess they changed how the API behaves. I'll dig deeper.
It seems that token: ""
or similar (including token:
absent) now resolves some (random?) nameless token on the page, so the settracker()
code now branches into the "this entry represents that token" bit.
I'll explicitly special-case token:
undefined or absent to avoid that.
This script...
... calls
settracker()
with this argument ...... and results in setting the tracker with all the correct character names, but the "Runde" entry misses the
title
and gets a seemingly random token from the board assigned (which does not have to be part of the list). Otherwise, the entry works (the formula is being applied when clicking through the players and moving to the next round).I get the same behavior when using
gettokens()
to pull the tokens on the board (unsurprisingly, since the problem is with the token-less "Runde" entry). Addingtoken: ""
does not change anything.