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

Blind Rolls 20-Bug?

Hello there! I am using a common blind rolls-API from the forum (with German just meaning "result sent to GM") in my games: on("chat:message", function(msg) { var cmdName = "!broll "; var msgTxt = msg.content; var msgWho = msg.who; var msgFormula = msgTxt.slice(cmdName.length); if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { sendChat(msgWho, "/gmroll " + msgFormula); sendChat(msgWho, "/w " + msgWho + " Ergebnis an SL gesendet (" + msgFormula + ")"); }; }); However for some time my blind roll-abilities (determined in the html-layout) don't seem to work anymore. I didn't change anything, but blindroll-abilities wouldn't be sent or even rolled on anymore. No error message in chat. Just nothing after clicking the button... Does someone made a similar experience and/or knows a way out? Thanks very much for any help!
1587309659
Kraynic
Pro
Sheet Author
Are there any error messages in the api console on the api settings page?  Does it start working again if you restart the api sandbox while logged into your game?
Ah thanks. While logged into my game, the following error message occured: Possible infinite loop detected, shutting down. Now I know what the problem is, but unfortunately I have no clue how to solve it. How do I get rid of that "possible infinite loop"?
Thanks a lot, Kraynic! It worked again when I restarted the API-Script. I still don't know why that error happened and how to prevent it from reocurring, but still happy that it worked again. Sorry for the noobish question...:)
1587323834

Edited 1587323873
Infinite loop detected is a default error when a script takes too long to respond. The API system shuts it down to prevent spinning CPU cycles. I think the time limit is somewhere like 30 to 60 seconds. Most scripts don't actually have an infinite loop, but a poorly written script could be inefficient and take a long time. It could also be a script is working with a huge set of data, or the API server is getting hit very hard (like now with all the new players due to the pandemic). Try using your scripts again, and keep the API window open in another browser to keep an eye on it. If it crashes again, you can note what you were doing just before it happens.