[Rseding91|RESOLVED|0.16.2] fluidbox not writable
Posted: Thu Dec 14, 2017 3:43 pm
Hi,
i'm not sure if this is a bug or just my lag of programming lua.
I used the fluidbox example from here: http://lua-api.factorio.com/latest/LuaFluidBox.html but at adding the fluid table i get this error:
Code:
#iwaterwell.fluidbox returns 1
The attached mod is another version as added in my other thread.
Greetings, steinio.
i'm not sure if this is a bug or just my lag of programming lua.
I used the fluidbox example from here: http://lua-api.factorio.com/latest/LuaFluidBox.html but at adding the fluid table i get this error:
Code: Select all
Error while running event StoneWaterWell::on_tick (ID 0)
__StoneWaterWell__/control.lua:20: bad argument #-1 to '__newindex' (string expected, got nil)
Code: Select all
amount = 0
fluid = iwaterwell.fluidbox[1] or {}
if fluid ~= nil then
amount = fluid.amount
end
fluid.type = "water"
fluid.amount = amount
fluid.temperature = 10
iwaterwell.fluidbox[1] = fluid
The attached mod is another version as added in my other thread.
Greetings, steinio.