Page 1 of 1

[0.16.7] wrong array size of #entity.fluidbox on tank-wagon

Posted: Fri Dec 22, 2017 6:18 am
by Optera
#entity.fluidbox for fluid-wagons still reports 3 for 0.16.7 causing the following code to crash with index out of bounds.

Code: Select all

if entity.type == "fluid-wagon" then
  for n=1, #entity.fluidbox do
    log("get fluidbox "..n.."/"..#entity.fluidbox)
    capacity = capacity + entity.fluidbox.get_capacity(n)
  end
end
expected behavior:
#entity.fluidbox returning 1

Re: [0.16.7] wrong array size of #entity.fluidbox on tank-wagon

Posted: Fri Dec 22, 2017 7:12 am
by Rseding91
Thanks for the report. I've fixed it for the next version of 0.16.