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

Updating Someone Elses Code

1605144433
Elgin
Pro
Marketplace Creator
I have been using a useful script called CreatureGen that suddenly isn't working anymore. Works fine in my last game, but when I try to use it in new games it fails everytime. I am assuming Roll20 updated something that only affects newly created games. Here is the code /**  * Object fix to resolve firebase errors  *  * @author Shu Zong C. */ var fixNewObject = function(obj) { //var p = obj.changed._fbpath; //var new_p = p.replace(/([^\/]*\/){4}/, "/"); //obj.fbpath = new_p; return obj; };  obj.changed returns a null object and when they try to look up the _fbpath property that causes a crash. I commented out the code and it works fine, but I have to assume it was doing something important. Does anyone know what fbpath is or which firebase errors this is addressing?
1605159689
The Aaron
Roll20 Production Team
API Scripter
Actually, that was code for a bug from about 4–5 years ago that Riley fixed. It isn't needed anymore. You can leave it commented out as you have it, or remove the call to it entirely. 
1605205275
Elgin
Pro
Marketplace Creator
Thanks, kinda worried it was going to break something important mid battle