Here's my problem:
function Pos()
{
this.x;
this.y;
}
...
var player = new Pos();
player.x = col;
player.y = row;
calculatePath(player);
...
function calculatePath(currentPos)
{
var i = currentPos.y, j = currentPos.x; // Uncaught TypeError: Cannot read property 'y' of undefined
....
}
Is there anything wrong with the way I'm passing my object as a parameter?

New Topic/Question
Reply



MultiQuote



|