@telegraffony said in SOS!!!:
store.getFreeCapacity()
Im not sure why this is as it feels off... but if you call store.getFreeCapacity() without an resource type argument on a structure that can only store certain types of resource (in this case, spawns, extensions, towers) will return 0.
You need to do store.getFreeCapacity(RESOURCE_ENERGY)
instead.