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

Sandbox documentation

Hey, sorry if this is posted anywhere obvious and I've missed it. Is there a good source of documentation for what methods are prototyped for the default classes (String, RegExp, etc) in the sandbox? I've just started writing scripts, but I've been running into little surprises like: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ TypeError: Object [object Object] has no method 'exec' at DebitModule.onMessage (evalmachine.<anonymous>:28098:21) at eval ( when using certain methods like RegExp.prototype.exec or String.prototype.startsWith , and rather than discover the limits by trial and error, I'd like a reference on what methods are prototyped by default inside the sandbox.
1456104207
The Aaron
Roll20 Production Team
API Scripter
There isn't any documentation of that sort available.
1456205731
Lithl
Pro
Sheet Author
API Scripter
You might want to share your code that error's coming from, because it looks like you've got some object that's been cast to a string value. And strings obviously don't have the exec function.
Ah, yes, user error. My bad. I'm a couple iterations beyond that, so I'm not exactly sure what I did wrong, but `RegExp.prototype.exec` is fine now. I was wrongfooted by the absense of `String.prototype.startsWith` (which is nonstandard, so I shouldn't have been), so I was overeager to find a flaw in the sandbox than in my code.