Thanks for your help.
findClosestByPath takes either a number or array. The number parameter is a FIND_?? constant. From API reference I am passing one of
I am actually scouting a source in a remote room to see if it is economic to harvest so I do not necessarily have access to a room object. In fact, here I am creating a function to calculate the exact distance between any two points. Hence I really want to only use RoomPosition and Map methods.
The code works mostly but for this one source object, both findClosestByPath and findClosestByRange seem to be failing. Ok, I will spend some more time debugging the code and maybe the problem will go away.