Issues linking Recipt

Place to get help with not working mods / modding interface.
Post Reply
UndeadHacker
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 27, 2018 6:30 pm
Contact:

Issues linking Recipt

Post 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

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Issues linking Recipt

Post by Nexela »

you have an entity (car) and a recipe, you don't have an item.

Post Reply

Return to “Modding help”