How to get data?
Posted: Wed Jan 10, 2018 7:06 am
How can I check the pollution required to create a biter?
This says the biter prototype doesn't have a "pollution_to_join_attack" key:
This says "data" is nil:
I check the entity is an enemy unit elsewhere in the code.
This says the biter prototype doesn't have a "pollution_to_join_attack" key:
Code: Select all
local quantity = math.ceil(event.entity.prototype.pollution_to_join_attack / 1000)
Code: Select all
local quantity = math.ceil(data.raw["unit"][event.entity.prototype.name].pollution_to_join_attack / 1000)