@wtfrank Thank you! Really need to spend more time on JS
Xihu
@Xihu
2
Posts
693
Profile views
0
Followers
0
Following
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.