DRY411S / Recycling-Machines

A factorio mod that adds Recycling Machines to the game. These disassemble products back into their original ingredients.
GNU General Public License v3.0
10 stars 2 forks source link

data-final-fixes.lua:552:attempt to concatenate local "result" a nil value. Not sure what I've done to cause it. #21

Closed Valerate closed 8 years ago

Valerate commented 8 years ago

https://www.dropbox.com/s/e7wxk3qp8cenqv2/Skjermbilde%202016-07-26%2001.06.38.png?dl=0 Screenshot of the error. My list of mods is huge, and many of them are made/ updated by me, but no one have had any issues untill I installed this mod. Just ask if there is any more info I can give :)

DRY411S commented 8 years ago

That error is caused by a recipe you have, but which produces no results! I don't test for this.

I don't understand why anybody would have a recipe that produces nothing?

I'd love to know what mod you have which does this, so I can test and debug.

Valerate commented 8 years ago

Oh do I? What... I dont know where and how but I'm sure I havnt made a recipe without results haha

Valerate commented 8 years ago

Heres my pack https://www.dropbox.com/s/g86wkcskdbqk09j/ValeratesModPack.rar?dl=0

Theres way to much edites and I am honestly amazed it even launches and works :) So, if you intend to find the broken recipee, good luck for I have looked for hours now and found nothing :<

DRY411S commented 8 years ago

I am assuming that this is a bug. An item and recipe that give this error are an 'alien-atrifact-fragment' in the ExtraStuff mod. Below (for my reference) is a dump of the item and its recipe.

{
  flags = {
    "goes-to-main-inventory"
  } --[[table: 000000000EADC580]],
  icon = "__ExtraStuff__/graphics/small-alien-artifact.png",
  name = "alien-artifact-fragment",
  order = "h",
  stack_size = 200,
  subgroup = "intermediate-misc",
  type = "item"
} --[[table: 000000000EAD51A0]]{
  enabled = "true",
  ingredients = {
    {
      "alien-artifact",
      1
    } --[[table: 000000000EACF5C0]]
  } --[[table: 000000000EACF560]],
  name = "alien-artifact-fragment",
  order = "h",
  results = {
    {
      "alien-artifact-fragment",
      20
    } --[[table: 000000000EACF680]]
  } --[[table: 000000000EACF620]],
  subgroup = "intermediate-misc",
  type = "recipe"
} --[[table: 000000000EACF500]]
DRY411S commented 8 years ago

The error is being caused by the Extra Stuff (and others in your list) mods not following the strict rules about how results should be formatted in recipes.

http://lua-api.factorio.com/latest/Concepts.html#Product

My code assumes that those rules are being followed, but in the example above the recipe does not include the 'type', or add any 'name' or ' amount' labels to the results.

'Extra Stuff' is not on the mod portal, 'DyTech' also gives this error but the author has not published a v0.13 version yet. Neither are therefore 'official' so I cannot offer to fix this issue until those mods are avaialble officially and follow the formats on the above link.

Will leave this issue open, but will not fix.

DRY411S commented 8 years ago

Actually, I've decided to fix this in v0.13.18