Can't get A* Pathfinder to work

Ah, I see now. I just printed startX, startY, mapW and mapH. Apparently startX and startY are both -1, while mapW and mapH are both 50. It’s possible that startX and startY being -1 affects open_nodes_map[i], since it will become open_nodes_map[-1][-1]. I also printed n0 and n0.priority and got these results:

n0 = table: 0x169e740
n0.priority = 0 [import]uid: 82408 topic_id: 19782 reply_id: 77389[/import]

What’s odd is that I can make my definitions of startX and startY up top 3 and 3, respectively, and it won’t change the fact that startX and startY both equal -1, yet at no point do I find code in any functions or so that say something like ‘startX = -1’ or ‘startY = -1’. This makes no sense [import]uid: 82408 topic_id: 19782 reply_id: 77393[/import]

Actually its in your main.lua:
local startCell = {col = -1, row = -1}

you are passing startCell.col and startCell.row to the pathfinder function…

local path = pathfinder.pathFind(level, kLevelCols, kLevelRows, startCell.col, startCell.row, endCell.col, endCell.row)

[import]uid: 19626 topic_id: 19782 reply_id: 77396[/import]

Awesome! I set the code to this:

local startCell = {col = 1, row = 1}  
local endCell = {col = 1, row = 1}  

Now there’s no errors, but I’m not seeing anything on my screen, just black. What’s really weird is that I have the visual code all in my main.lua, but it’s like it’s not calling that code or whatever. Oh, and n0 seems to vary randomly, so forget what I said earlier about the results of printing it. [import]uid: 82408 topic_id: 19782 reply_id: 77397[/import]