Page 1 of 1

Error while loading mod

Posted: Mon Jun 05, 2017 4:21 pm
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}
    }
  }

Re: Error while loading mod

Posted: Mon Jun 05, 2017 4:33 pm
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.)

Re: Error while loading mod

Posted: Mon Jun 05, 2017 5:21 pm
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)

Re: Error while loading mod

Posted: Mon Jun 05, 2017 5:56 pm
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