Trying to create a couple of tokens for a script I will release soon. problem is that I get the error: "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." I have uploaded three images to my library that I am using as placeholders. (a red square) <a href="https://s3.amazonaws.com/files.d20.io/images/50183" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/50183</a>... (a grey square) <a href="https://s3.amazonaws.com/files.d20.io/images/50183" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/50183</a>... (a transparent png) <a href="https://s3.amazonaws.com/files.d20.io/images/38361" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/38361</a>... I have read the API instructions about imgsrc restrictions. I think I am using valid links. these files have been uploaded to my library. I found the links by dragging te tokens from my roll20 image library to the page grid, then pressing Z and copying the image adress from the zoomed-in token. sometimes one of the tokens is created but not the rest. I even set delays in my code to avoid all the token objects being created at the same time. all to no avail, it just inconsistently gives me the error message above. I want these images to be available to all players that use my script btw - as an example, TrackerJacker script does this (there is a graphic that is created around the player token, that has to be from an imgsrc link.) Here is the code snippet that I use to create the tokens: setTimeout(function() {
//Gryphon
var testToken1 = createObj("graphic", {
_subtype: "token",
_pageid: Campaign.get("playerpageid"),
represents: AuxObj.get("_id"),
name: "Scenario Switcher: Scenario with Gryphon",
showname: true,
imgsrc: "<a href="https://s3.amazonaws.com/files.d20.io/images/50183580/M926JFbiBvBbEfWc9-i3Zg/thumb.png?15214606025" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/50183580/M926JFbiBvBbEfWc9-i3Zg/thumb.png?15214606025</a>",
left: 70,
top: 70,
width: 70,
height: 70,
statusmarkers: "dead, spanner",
layer: "walls",
bar1_value: "Gryphon",
bar1_max: "A Gryphon attacks ,Gryphon| No attack happens ,NoGryphon| image description 3 ,-| image description 4 ,-| image description 5 ,-",
gmnotes: "",
});
log(testToken1);
}, 1*1000);
setTimeout(function() {
var testToken2 = createObj("graphic", {
_subtype: "token",
_pageid: Campaign.get("playerpageid"),
represents: AuxObj.get("_id"),
name: "Gryphon",
showname: true,
imgsrc: "<a href="https://s3.amazonaws.com/files.d20.io/images/38361589/Ip65dur3Rhylowaxv0-qTw/thumb.png?15040768025" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/38361589/Ip65dur3Rhylowaxv0-qTw/thumb.png?15040768025</a>",
left: 140,
top: 140,
width: 70,
height: 70,
statusmarkers: "dead, fluffy-wing",
layer: "walls",
bar1_value: "Gryphon",
bar1_max: "A Gryphon attacks ,Gryphon| No attack happens ,NoGryphon| image description 3 ,-| image description 4 ,-| image description 5 ,-",
gmnotes: "object_layer",
});
log(testToken2);
}, 2*1000);
//No Gryphon
var testToken3 = createObj("graphic", {
_subtype: "token",
_pageid: Campaign.get("playerpageid"),
represents: AuxObj.get("_id"),
name: "Scenario Switcher: Scenario without Gryphon",
showname: true,
imgsrc: "<a href="https://s3.amazonaws.com/files.d20.io/images/50183581/8jh_JYEAhYffVfBguqtt0A/thumb.png?15214606025" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/50183581/8jh_JYEAhYffVfBguqtt0A/thumb.png?15214606025</a>",
left: 70,
top: 70,
width: 70,
height: 70,
statusmarkers: "dead, spanner",
layer: "walls",
bar1_value: "NoGryphon",
bar1_max: "A Gryphon attacks ,Gryphon| No attack happens ,NoGryphon| image description 3 ,-| image description 4 ,-| image description 5 ,-",
gmnotes: "",
});
log(testToken3);