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]