I am trying to get my creeps to withdraw energy from my containers to move to extensions for spawning, but my code isn't finding any of the containers, even though they're full and the creeps are standing right next to them, a search for containers or a call to withdraw returns null. These are the two types of code I tried. var targets = creep.room.find(FIND_STRUCTURES, {
filter: (structure) => {
return
(structure.structureType == STRUCTURE_CONTAINER && structure.store[RESOURCE_ENERGY] > 0);}}
)
var resource = creep.pos.findClosestByRange(STRUCTURE_CONTAINER);