You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded your code, and tried it by passing an array as following:
var pt:Pathfinder = new Pathfinder();
var arr:Array = new Array();
arr = [[0,0,0],[0,0,0],[0,0,0]];
pt.loadMap(arr, 2, 2);
var path:Array = pt.getPath(new Point(0, 0), new Point(2, 2));
Which gives the following error:
"TypeError: Error #1010: A term is undefined and has no properties."
(Line #108 of your code)
Then I tried to give dimensions as "3,3" as in: "pt.loadMap(arr, 3, 3);"
It gives the same error again. But now on Line #190 of your code.
So, what am I doing wrong??
Original issue reported on code.google.com by epi...@gmail.com on 2 Feb 2012 at 9:16
The text was updated successfully, but these errors were encountered:
public function loadMap(m: Array) {
map = m;
tmpMap = new Array();
dimensionX = map.length;
dimensionY = map[0].length;;
}
Instead of
public function loadMap(m: Array, dX:Number, dY:Number) {
map = m;
tmpMap = new Array();
dimensionX = dX;
dimensionY = dY;
}
Original comment by fluoc...@gmail.com on 3 Mar 2012 at 7:01
Original issue reported on code.google.com by
epi...@gmail.com
on 2 Feb 2012 at 9:16The text was updated successfully, but these errors were encountered: