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

Dungeon Draw by Stephen S. keeps giving an error

January 26 (8 years ago)

Edited January 26 (8 years ago)
I started trying to use Dungeon Draw by Stephen S. and all I get is an error.
Other scripts I have been playing with are working fine (Token name number, it's a trap, bloodied and dead status markers)

Here is what I did.

1. I created a new game. 
2. Copied all 3 scripts and put them into API (added the dungeon share.js too just to try)
3. Purchased the his Dungeon Draw Tiles part 1 and very carefully updated the URL links in the Tiles.js for the set I wanted to try.
(Note: I get this error even if I have the base script installed or the one with the updated tile URL's)
4. Opened a map and went to map layer. (have tried with dynamic lighting both enabled and disabled)
5. Made sure I have the latest version of Chrome. Also installed the newest firefox to try
Every time I try to draw even a single shape at all, the API output console gives me the following error

Stephen S., if you see this, I could really use your help, I know nothing about Java or programming. If I can get this working, it will make things so much easier since my group really likes dungeons.

TypeError: Cannot read property 'attributes' of undefined 

TypeError: Cannot read property 'attributes' of undefined
at updateLocalCache (/home/node/d20-api-server/api.js:1196:20)
at /home/node/d20-api-server/api.js:1347:11 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560
at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)
at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)
at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:461
at S (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:57:1015)
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:441
January 26 (8 years ago)
The Aaron
Pro
API Scripter
(He'll see it.)
January 26 (8 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
So.... I looked at it and found an issue.

Aaron helped get around the issue... path remove seems to be acting up.

Replace your DungeonDraw.js with this file: https://gist.github.com/BaldarSilveraxe/8e987828e2...

See if that helps, if it does I will update the script on Github.
January 26 (8 years ago)
Riley D.
Roll20 Team
There is a fix for this on the API Server for Dev now. It will go to Main next week with the noarchive:true fixes. Your workaround is solid but you can leave out the _.defer() workaround after the fix goes live next week if you want.
January 26 (8 years ago)
The Aaron
Pro
API Scripter
Awesome, thanks Riley!
January 26 (8 years ago)
I tried the updated script. It no longer freezes or shuts down the API. 
I drew 3 boxes om the map layer, but when I click Rol20Draw, what I just put in vanishes.
API is still running but has the following in the API Output Console
(And yes, it repeats that many times(


"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
"ERROR: Please use the 'thumb' size for imgsrc properties."
January 26 (8 years ago)

Edited January 26 (8 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
When you update the URL with images from your libray make sure you edit "med" to thumb.

{url:'https://s3.amazonaws.com/files.d20.io/images/8736624/jpVc2CyG315UC7_KG-4lLA/thumb.jpg?1428598086', key:'DD_001', value:124, mask:125, dlBits:124, diag:false},
January 26 (8 years ago)
I dropped a copy of each tile on the map and clicked each one and ran a script to pull the URL for the image.
I then copy and pasted each one into the file, making sure to leave the rest of the line intact.

January 26 (8 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Send me a campaign invite... I think I can fix that for you.
January 26 (8 years ago)
He got me all fixed up and running.
Thanks again Stephen !!