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

This subforum contains all the issues which we already resolved.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post 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
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. I've fixed it for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”