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

need help with api Script Random Dungeon Generator with Dynamic Lighting

I get this error Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: TypeError: Cannot read property 'tileName' of undefined TypeError: Cannot read property 'tileName' of undefined at apiscript.js:1020:16 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:153:9) at buildTileArray (apiscript.js:1018:7) at geomorph (apiscript.js:967:35) at processMessage (apiscript.js:910:31) at apiscript.js:904:61 at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1200:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 please help if you can
update now I get this error Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: TypeError: Cannot read property 'changed' of undefined TypeError: Cannot read property 'changed' of undefined at fixNewObject (apiscript.js:682:16) at placeTile (apiscript.js:677:12) at stepThroughMap (apiscript.js:664:13) at geomorph (apiscript.js:528:58) at processMessage (apiscript.js:468:31) at apiscript.js:462:61 at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:105:34), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1200:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560
1472200291
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
It's likely an issue with the item name in the rollable table.  If that is not it send me an invite.
ya made another table still no go not sure what im doing wrong
"Geo_Type_A_0001" "Geo_Type_A_0002" "Geo_Type_A_0003" "Geo_Type_A_0004" "Geo_Type_A_0005" "Geo_Type_A_0006" "Geo_Type_A_0007" "Geo_Type_A_0008" "Geo_Type_A_0009" "Geo_Type_A_0010" "Geo_Type_A_0011" "Geo_Type_A_0012" "Geo_Type_A_0013" "Geo_Type_A_0014" "Geo_Type_A_0015" "Geo_Type_A_0016" "Geo_Type_A_0017" "Geo_Type_A_0018" "Geo_Type_A_0019" "Geo_Type_A_0020" "Geo_Type_A_0021" "Geo_Type_A_0022" "Geo_Type_A_0023" "Geo_Type_A_0024" "Geo_Type_A_0025" "Geo_Type_A_0026" "Geo_Type_A_0027" "Geo_Type_A_0028" "Geo_Type_A_0029" "Geo_Type_A_0030" "Geo_Type_A_0031" "Geo_Type_A_0032" "Geo_Type_A_0033" "Geo_Type_A_0034" "Geo_Type_A_0035" "Geo_Type_A_0036" "Geo_Type_A_0037" "Geo_Type_A_0038" "Geo_Type_A_0039" "Geo_Type_A_0040" "Geo_Type_A_0041" "Geo_Type_A_0042" "Geo_Type_A_0043" "Geo_Type_A_0044" "Geo_Type_A_0045" "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." "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." now im here so im guess its the api restirction thingy i need to get around anyone got a tip?
1472217552
The Aaron
Pro
API Scripter
"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." This indicates you're using an image directly from the Marketplace rather than from your user library.  To use an image from the Marketplace with an API Script, you must download the image to your computer, then uploaded it to your user library (often by just dragging it onto the VTT or into a Rollable Table).
1472218532
Ziechael
Forum Champion
Sheet Author
API Scripter
The Aaron said: "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." This indicates you're using an image directly from the Marketplace rather than from your user library.  To use an image from the Marketplace with an API Script, you must download the image to your computer, then uploaded it to your user library (often by just dragging it onto the VTT or into a Rollable Table). Until the API can access image tags... oh hey, while on that subject feel free to lend any free vote you may have to  this suggestion to enable just that.
"ERROR: Please use the 'thumb' size for imgsrc properties." now just the one error i think im getting close
1472221631
The Aaron
Pro
API Scripter
Ah, right. &nbsp;In the URL, the name of the file needs to be thumb . &nbsp;It might be any one of med , max , original , or similar. &nbsp;Just change it to thumb . Example: <a href="https://s3.amazonaws.com/files.d20.io/images/16204335/MGS1pylFSsnd5Xb9jAzMqg/" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/16204335/MGS1pylFSsnd5Xb9jAzMqg/</a> med .png?1455260461 would become: <a href="https://s3.amazonaws.com/files.d20.io/images/16204335/MGS1pylFSsnd5Xb9jAzMqg/" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/16204335/MGS1pylFSsnd5Xb9jAzMqg/</a> thumb .png?1455260461
all mine look like this. how do you get it to a thumb?&nbsp; 18616-Geo_Type_A_0028.jpg
update made them thumb size here&nbsp;<a href="http://makethumbnails.com/#dropzone" rel="nofollow">http://makethumbnails.com/#dropzone</a> still a no go anyway to change the code to bypass that?
1472253445
The Aaron
Pro
API Scripter
Sorry for the confusion. &nbsp;They need to be uploaded to your&nbsp; Library . &nbsp;The API can only create images that are in a User Library. &nbsp;Once you've uploaded the images there, you can right click the image in the library and copy the image location.
1472256989

Edited 1472257108
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I am the confusion. I got it working but I need to rewrite that script. PS: It might not all be my fault, "javascript the good parts" was not published at the time of the writting of the script.
1472257191
The Aaron
Pro
API Scripter
Ha!!! &nbsp;Liar!!! &nbsp;=D
1472271827

Edited 1472287368
great job guys! thanks so much