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

Putting functions in "on ready" sometimes results in the "Infinite loop or long running process detected" error

1390968732
Chad
Sheet Author
Okay, I've been hunting this one down for a while for scripts that have absolutely no chance of being infinite loops, and I think I've found a possible cause. I sometimes get the "Infinite loop or long running process detected" error when I save a script. Then I'll save the same one again and it goes through just fine. After poking around and trying different things, I've found that the error seems related to using the "on ready" event handler, and may be related to sending output inside said handler. For example, I had a script that all it did was send a welcome message to players when scripts were initialized. It used the "on ready" handler and the chat command and nothing else... and even when it was my only script, it sometimes got the error. Of course, the same chats anywhere else in the script seemed to behave just fine. Is it possible that waiting for a "ready" takes too long? Thanks!
If there's a simple script you can create that you can regularly get to trigger the error, then that would be helpful in showing the problem and helping me debug it...