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

My turn tracker API has broken on a custom sheet

I returned to my game after a couple of weeks and discovered that the routine I use to post entries to the turn tracker with is now broken after working perfectly for a number of years. So my question is what's changed in the turn tracker to break my code ? Is a _pageid entry now required for the token to show ? WHERE FINAL ORDER is equal to [{"custom":"START","pr":"0","id":"-1","_pageid":"-MtD--Ev8X6XF-CUtswK"},{"custom":"Thug 3","pr":265,"id":"-MtD3ddOV4ji9B3NUSEn"},{"custom":"Thug 2","pr":276,"id":"-MtD3bkK_b_iLKKAvZqg"}]             log(FINALORDER);             Campaign().set("turnorder",JSON.stringify(FINALORDER)); Thanks for any light anyone can shed on this problem.
1645319588
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There was a recent change in the base code that changed the way turn tracking is sent via API (and presumably, sheet code?). More information . And a followup .
Cheers thanks Keith I have worked out what is causing the bug in my script _pageid is not being returned anymore with the selected part of a message structure or it was never returned, but it wasn't necessary to have it in the TurnOrder structure for the turn tracker.  The _pageid field is null and the field is therefore ommited from the object, effectively deleting it. I would argue _pageid should be set for each graphic object returned in selection of objects, as it is important to know which page an object is on because it is possible to have players on different pages, making selections on different pages.
Thanks again I will use Arons's work around.