@wtfrank Thank you! Really need to spend more time on JS
Posts made by Xihu
-
RE: Finding all the road construction sites and delete them:?
-
Finding all the road construction sites and delete them:?
This is what I do, but doesn't seem to work
var thisRoom = Game.spwans["Spawn1"].room; var constructionSites = thisRoom.find(FIND_CONSTRUCTION_SITES); for (var site in constructionSites) { if (site.structureType == STRUCTURE_ROAD) { site.remove(); } }
From my debugging result, looks like site.structureType is undefined.