[2.0.15][Space Age] Access via mod to cago_pod during rocket launch causes non-recoverable
Posted: Tue Nov 05, 2024 5:24 pm
I am currently in the process of adapting my mod Picklocks rocket silo stats for Space Age. I would like to record the payload of launched rockets. In the base game I use the inventory of the cargo_pod.
In Space Age, the following error occurs when defining the inventory of the cargo_pod:
Here is the corresponding line of code that works in the base game and causes the error in Space age:
I would have expected the code from the base game to also work in Space Age.
The error always occurs in Space Age.
See also the following discussion:
viewtopic.php?p=633329#p633329
In Space Age, the following error occurs when defining the inventory of the cargo_pod:
Code: Select all
The mod Picklocks rocket silo stats (1.3.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event PicksRocketStats::on_rocket_launched (ID 10)
__PicksRocketStats__/control.lua:631: attempt to index field 'cargo_pod' (a nil value)
stack traceback:
__PicksRocketStats__/control.lua:631: in function <__PicksRocketStats__/control.lua:597>
Code: Select all
local inventory = event.rocket.cargo_pod.get_inventory(defines.inventory.cargo_unit)
The error always occurs in Space Age.
See also the following discussion:
viewtopic.php?p=633329#p633329