Error while loading mod

Place to get help with not working mods / modding interface.
Post Reply
NastyGamer
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jun 05, 2017 4:17 pm
Contact:

Error while loading mod

Post by NastyGamer »

I wrote a little mod, however I always get this error: Error while loading recipe prototype "hydrogen" (recipe): No such node (icon).

Code: Select all

{
    type = "recipe",
    name = "hydrogen",
    category = "chemistry",
    enabled = true,
    energy_required = 3,
    ingredients =
    {
      
      {type="fluid", name="water", amount=1}
      
    },
    results=
    {
      {type="fluid", name="hydrogen", amount=2},
      {type="fluid", name="oxygen", amount=1}
    }
  }

User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 565
Joined: Sat May 10, 2014 7:20 am
Contact:

Re: Error while loading mod

Post by Kayanor »

Your recipe prototype has no icon defined.

That's what the error says.

Add one by adding

Code: Select all

icon = "__MOD-NAME__/some-path/filename.png"
to the code.

(I could be wrong, it's been a long time since I last modded the game myself.)
Former moderator.

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

Re: Error while loading mod

Post by Nexela »

Kajanor wrote:Your recipe prototype has no icon defined.

That's what the error says.

Add one by adding

Code: Select all

icon = "__MOD-NAME__/some-path/filename.png"
to the code.

(I could be wrong, it's been a long time since I last modded the game myself.)

Either add an icon (or icons) or main_result == "hydrogen" to the recipe (I think it is main_result not sure)

NastyGamer
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jun 05, 2017 4:17 pm
Contact:

Re: Error while loading mod

Post by NastyGamer »

Kajanor wrote:Your recipe prototype has no icon defined.

That's what the error says.

Add one by adding

Code: Select all

icon = "__MOD-NAME__/some-path/filename.png"
to the code.

(I could be wrong, it's been a long time since I last modded the game myself.)
Yea that was the problem. thanks

Post Reply

Return to “Modding help”