
Hello awesome community! I'm no expert on Javascript and need some insights. BTW I'm the player helping troubleshoot the error. DM is Pro user so we have API access. We use the 5e Shaped sheet for our game (I know it is not longer supported). Recently the API is no longer working with error " Possible infinite loop detected, shutting down. ". The error only occur when the companion script is enabled. After more digging I think something wrong with this part (I may be wrong. Again no expert here): roll20.on("ready", function() {
logger.info("-=> ShapedScript " + SCRIPT_VERSION + " <=-");
logger.info("-=> debug 1 <=-");
var character = roll20.createObj("character", {
name: "SHAPED_VERSION_TESTER"
}),
campaignSize = roll20.findObjs({}).length;
logger.info("-=> debug 2 <=-");
logger.debug("Campaign size: $$$", campaignSize), roll20.createAttrWithWorker(character.id, "sheet_opened", 1, function() {
runStartup(character, 0)
})
}) I added those logger.info so I can better track what's going on. The script successfully create the "SHAPED_VERSION_TESTER" character sheet and add "sheet_opened" to Attributes. However, I don't think it fires the "runStartup" function at all. I tried the logger.info before "runStartup" and the first line in the actual function, but nothing return in the console. More info: we use the 5e Shaped sheet in the One Click install and the script from here: <a href="https://github.com/mlenser/roll20-api-scripts/tree/master/5eShapedScript" rel="nofollow">https://github.com/mlenser/roll20-api-scripts/tree/master/5eShapedScript</a> . I also tried create a new campaign with the same setup and it works perfectly. The only difference is the size of the campaign. Really appreciate it if anyone can share some light on how to fix it!