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 .
×

[Bug][API] randomInteger() silently hangs the API if it is given a bad string as an argument.

1443453788
The Aaron
Roll20 Production Team
API Scripter
I finally tracked down the issue with Blood And Honor that has been causing weird problems: if (randomInteger(obj.get("bar3_max")) > obj.get("bar3_value")) { I'm submitting a patch for it, but what's weird is that if bar3_max is not a number, passing it to randomInteger() seems to cause the API server to become unresponsive until it is restarted with a Save Script. It doesn't crash, there is no error message, it just doesn't do anything anymore. Here's a minimal reproducible case: on('ready',function(){ log('Begin randomInteger() test.'); setTimeout(function(){ log(randomInteger('')); },1000); }); (Actually, you don't need the setTimeout() , I just put that in there so I could tell the API actually started. )
Hi Aaron, I'll test both reports out on my end and make sure they get logged.   Thanks.