We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DyWorld-Dynamic mod introduces new radar which burns carbon fuel for it to run.
So entity:inventory("fuel") at https://github.com/321freddy/even-distribution/blob/master/scripts/cleanup.lua#L267 returns nil and then is accessed right away, causing Lua's equivalent of Null pointer exception.
entity:inventory("fuel")
nil
After some debugging I found that entity.get_inventory("fuel") returns actual inventory while entity.get_fuel_inventory() returns nil. It appears to be bug in Factorio, but fast fix for this mod would be to use entity.get_inventory(defines.inventory.fuel) on line https://github.com/321freddy/even-distribution/blob/master/scripts/helpers/LuaControl.lua#L67
entity.get_inventory("fuel")
entity.get_fuel_inventory()
entity.get_inventory(defines.inventory.fuel)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
DyWorld-Dynamic mod introduces new radar which burns carbon fuel for it to run.
So
entity:inventory("fuel")
at https://github.com/321freddy/even-distribution/blob/master/scripts/cleanup.lua#L267 returnsnil
and then is accessed right away, causing Lua's equivalent of Null pointer exception.After some debugging I found that
entity.get_inventory("fuel")
returns actual inventory whileentity.get_fuel_inventory()
returnsnil
. It appears to be bug in Factorio, but fast fix for this mod would be to useentity.get_inventory(defines.inventory.fuel)
on line https://github.com/321freddy/even-distribution/blob/master/scripts/helpers/LuaControl.lua#L67The text was updated successfully, but these errors were encountered: