I recently started encountering this error on a private server:
at parseRoomName (<isolated-vm>:20356:15)
at toWorldPosition (<isolated-vm>:20408:22)
at <isolated-vm>:20452:26
at arrayMap (<isolated-vm>:2645:25)
at Function.map (<isolated-vm>:7949:14)
at Object.search (<isolated-vm>:20442:23)
at Object.search (<isolated-vm>:27254:42)
I simplified the code to the following minimum which still creates the error:
var _pos_a = new RoomPosition(25, 25, 'W3N7');
var _pos_b = new RoomPosition(30, 30, 'W3N7');
var _cost_matrix = CostMatrixExit();
var _path = PathFinder.search(_pos_a, { pos: _pos_b, range: 1 }, { roomCallback: _cost_matrix });
_cost_matrix is a function as follows:
CostMatrixExit: function ()
{
let _cost_matrix = new PathFinder.CostMatrix;
maxOps = 2000;
for (var _x = 0; _x < 50; _x++)
for (var _y = 0; _y < 50; _y++)
{
if (_x < 1 || _x > 49 || _y < 1 || _y > 49)
_cost_matrix.set(_x, _y, 255);
}
return _cost_matrix;
},
I'm not sure what has gone wrong, it did work before, for a long time.
If anyone can help me out I would greatly appreciate it