Page 1 of 1

[15.37] Crash caused by mod

Posted: Mon Nov 20, 2017 9:29 am
by Heavy_Cat
I'm having trouble with making my first mod. I contacted a popular Factorio server (Supposedly supported by your dev team) and they said that my mod was breaking Factorio because your code is wrong somehow. can you help me on this?

Re: Mod Difficulty

Posted: Mon Nov 20, 2017 9:31 am
by Koub
[Koub] Moved to Modding help
Your mod code would probably help diagnosing what's wrong :).

Re: Mod Difficulty

Posted: Mon Nov 20, 2017 9:33 am
by Bilka
mod: https://cdn.discordapp.com/attachments/ ... _0.1.2.zip

log file: https://cdn.discordapp.com/attachments/ ... urrent.log

The issue seems to be coming from the recipe definition or the multiple requires in the data.lua, not sure. I fixed those and no longer got an unexpected error: https://cdn.discordapp.com/attachments/ ... _0.1.2.zip

Re: [15.37] Crash caused by mod

Posted: Mon Nov 20, 2017 10:33 am
by Rseding91
Thanks for the report. This is a duplicate but I can't find the original bug report. Basically it's crashing because it's expecting you have recipes defined like this:

Code: Select all

ingredients =
{
  {"name", count},
}

results=
{
  {"name", count}
}
And you've not provided at least 2 things per ingredient and result. in 0.16 it will give you a proper error saying so.