I tried to get liquid from a entity in the control.lua, but it doesnt seem to work (returns nil), the entitt is a storage tank, I tried to do it in the console, and it works.
Im sure the entity is a storage tank, because I printed the name.
Edit: Not sure if this matters but it is in the onguiclick event.
[0.9.0] Not sure if it is a bug (Control.lua, getliquid())
Re: [0.9.0] Not sure if it is a bug (Control.lua, getliquid(
I tried it in the console as well and it works, I don't know why it couldn't work, are you sure it is not some other error?
Can you minimise the error to smallest possible code example ?
Can you minimise the error to smallest possible code example ?
Re: [0.9.0] Not sure if it is a bug (Control.lua, getliquid(
What happens if you connect pipes to all possible connection spots?
getliquid returns the contents of one "fluid container" and you can't specify which one, so it might be getting the fluid in one of the pipe connections.
getliquid returns the contents of one "fluid container" and you can't specify which one, so it might be getting the fluid in one of the pipe connections.
Re: [0.9.0] Not sure if it is a bug (Control.lua, getliquid(
The pipe has just one fluidbox, so this method will work fine for it. The count of connections of the fluidbox doesn't really matter.immibis wrote:What happens if you connect pipes to all possible connection spots?
getliquid returns the contents of one "fluid container" and you can't specify which one, so it might be getting the fluid in one of the pipe connections.
Re: [0.9.0] Not sure if it is a bug (Control.lua, getliquid(
Ok sorry for tanking so long answering this.
Is not a bug, it only happens when the storage of the tank is empty, that confused me a bit.
Is not a bug, it only happens when the storage of the tank is empty, that confused me a bit.
Re: [0.9.0] Not sure if it is a bug (Control.lua, getliquid(
Okay, that makes sense. When the tank is empty, there's no liquid in it. getliquid() returns nil to mean "no liquid" - otherwise it would have to specify a type.ficolas wrote:Ok sorry for tanking so long answering this.
Is not a bug, it only happens when the storage of the tank is empty, that confused me a bit.