spoiler
but for my case i get the error for the line with the multiplication: "attempt to perform arithmetic on field '?' (a nil value)".I found out that it works for some ingredients if i do it like this:
spoiler
Which works for solar panels and the basic ingredients in the recipe, but not for some of the ingredients changed out by bobspower. Bobs exchanges steel to titanium plate for example for certain panels. Even if i doCode: Select all
if ingredient[2] ~= nil then
ingredient[2] = ingredient[2] * 2
end
I looked at the code from bobslibrary but i'm not really versed in lua so i can't judge if titanium plates etc not getting multiplied is an issue with how it changes out the ingredients. The code is here in any case:
Ingredient switching