@jbyoshi Thanks for the help; I'm kinda ashamed, seems like the error wasn't caused by _pos_a, but by _pos_b, in my actual code I use the variable "_closest" to find a RoomPosition which i pass to PathFinder.search, i also recently added another variable with the same name wich calculated distance, so in this case _pos_a was correct, but _pos_b was a integral value. I'm dumb, I stayed up too long, programmers need sleep too I guess. Thanks for your help it works again