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

[PATCH] Path Math 1.4.1

1485528016
Ada L.
Marketplace Creator
Sheet Author
API Scripter
It has come to my attention that a bug in Path Math 1.4's toSegments function has been causing issues for several other scripts depending on it.Here is a patch that should fix the problem:&nbsp; <a href="https://github.com/Cazra/roll20-api-scripts/blob/P" rel="nofollow">https://github.com/Cazra/roll20-api-scripts/blob/P</a>... Let me know if any more problems arise. I'm very sorry for any inconveniences this has caused.
1486005489

Edited 1486005979
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Stephen, So, hate to do this, but Path Math is still throwing the same error for me with the updated Path Math code. Here's the function I'm calling PathMath.tosegments from: mapObjects = function(obj,type){ var colStart,colEnd,rowStart,rowEnd,x,y, pageID = obj.get('pageid'); colStart=Math.floor((obj.get('left')-obj.get('width')/2)/70); colEnd=Math.ceil((obj.get('left')+obj.get('width')/2)/70); rowStart=Math.floor((obj.get('top')-obj.get('height')/2)/70); rowEnd=Math.ceil((obj.get('top')+obj.get('height')/2)/70); for(y=_.clone(rowStart);y&lt;rowEnd;y++){ for(x=_.clone(colStart);x&lt;colEnd;x++){ maps[pageID][x+'X'+y]=maps[pageID][y][x]||{}; maps[pageID][x+'X'+y]['object']=maps[pageID][y][x]['object']||[]; maps[pageID][x+'X'+y]['object'].push(obj.id); maps[pageID][x+'X'+y]['x']=x; maps[pageID][x+'X'+y]['y']=y; } } }, Ignore this, had an incorrect declaration in there that just resulted in a very similar error.