Page 1 of 1

Issues linking Recipt

Posted: Sat Jan 27, 2018 6:38 pm
by UndeadHacker
Hey everyone,

First post, and first mod I am writing.

I have written some lua for an object I want to add to the game along with the lua for the recipe.

When I launch the game it is telling me the result = <name> does not exist. I have the object with that name located directly above it. Has something changed for 0.16 in how the recipe is added?

Recipe Snippet:

Code: Select all

local recipe = {
  type = "recipe",
  name = "bat-recipe",
  enabled = "true",
  ingredients = 
  {
    {"iron-plate",200}
  },
  result = "bat"
}
Part of Object:

Code: Select all

local batitem = {
  type = "car",
  name = "bat",
...
Adding object:

Code: Select all

data:extend{batitem, recipe}
When I remove the references to recipe, the game loads fine however I cannot get the object.

I also tried intentionally incorrectly setting the name in the result = "bat" to ensure that is where the error is, and the error changed to have this new name.

I also have references to bat in config.cfg which allows the game to load.

Any help would be appreciated

UndeadHacker

Re: Issues linking Recipt

Posted: Sun Jan 28, 2018 12:20 am
by Nexela
you have an entity (car) and a recipe, you don't have an item.