
When using the createObj() call in an API script to create any of the objects with an 'imgsrc' or 'avatar' attribute it logs the following error if you do not set the imgsrc/avatar attribute: ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info. While I can understand this could be a legitmate error when creating the graphic object, I still consider this is a bug because creating an object using the default values for the optional attributes of said object shouldn't throw an error. These error messages clutter the log and make it difficult to spot legitimate errors. the following test function can be used to recreate the issue: function test_createObj_bug(){ /** the error message being logged makes sense here when creating an object of type:graphic, but it would make more sense to make imgsrc a required field for the object, like how pageid is a required field to create the object. **/ var pageId = Campaign().get('playerpageid'); log('Creating a Graphic object with default settings.'); createObj('graphic',{pageid:pageId,name:'test_graphic',layer:'objects'}); /** the error message being logged doesn't make sense for these calls since the imgsrc/avatar attribute is optional and defaults to an empty string **/ log('Creating a Character object with default settings.'); createObj('character',{name:'test_character'}); log('Creating a Handout object with default settings.'); createObj('handout',{name:'test_handout'}); var table = createObj('rollabletable',{name:'test_table'}) log('Creating a Table Item object with default settings.'); createObj('tableitem',{rollabletableid:table.get('id'),name:'test_tableitem'}); } Executing that code generates this log: