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

createObj() help

What is the bare minimum that needs to be passed to createObj() to create a graphic object? var newObj = createObj("graphic", { imgsrc: Straight[0], width: 128, height: 128, layer: "gmlayer" }); Straight[0] contains the url string obtained from inspecting the image library pane for a particular object. newObj is coming back undefined. Am I overlooking some formatting thing?
Solved-- noticed an Error report in the log that informed me of what's needed. Not sure how I missed it before. Now working as expected.