
a script I've written that I'm using to test the new getSheetItem() keeps returning stale data until I restart the API, I have updated the hp in the character sheet but the log does not show this change. I'm really no expert with this so forgive me if I've missed something simple. here is my script
on("ready", () => { log("✅ HP (Polling) Loaded."); // The character ID in your game const charId = "-OKNny3T6BPI8gxuM6P7"; // Poll every 5 seconds setInterval(async () => { try { const hpValue = await getSheetItem(charId, "hp"); log(`HP: ${hpValue}`); } catch (err) { log(`Error fetching HP: ${err}`); } }, 5000); }); |
here is the logging "HP: 9" "HP: 9" Restarting sandbox by user request... detected currently running sandbox... restarting "HP: 9" "✅ Minimal Beacon Example (Polling) Loaded." "##########> Sandbox [EXPERIMENTAL 2025-03-11] : Ready fired after 5.54s, 24 objects." "HP: 14" "HP: 14" |