From the logs it's pretty clear that when Crow Kids add fuel to fire, they pass in nil, as seen in the ADDFUEL action:
ACTIONS.ADDFUEL.fn = function(act)
if act.doer.components.inventory and act.invobject then
local fuel = act.doer.components.inventory:RemoveItem(act.invobject)
if fuel then
if act.target.components.fueled and act.target.components.fueled:TakeFuelItem(fuel, act.doer) then
return true
else
--print("False")
act.doer.components.inventory:GiveItem(fuel)
end
end
elseif act.doer.components.fueler then
if act.target.components.fueled and act.target.components.fueled:TakeFuelItem(nil, act.doer) then
return true
end
end
end
In my code here, we check if the fuel is charcoal, but we don't have a nil/table check for the item itself, because previously it was assumed there would always be an item.
I should add a simple check to see if it's a table before checking for charcoal.
User
Kova
on steam posted:From the logs it's pretty clear that when Crow Kids add fuel to fire, they pass in nil, as seen in the
ADDFUEL
action:In my code here, we check if the fuel is charcoal, but we don't have a nil/table check for the item itself, because previously it was assumed there would always be an item.
I should add a simple check to see if it's a table before checking for charcoal.