Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot figure out this #4

Open
GoogleCodeExporter opened this issue Jan 27, 2016 · 1 comment
Open

I cannot figure out this #4

GoogleCodeExporter opened this issue Jan 27, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

        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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant