Page 1 of 1

New Modder Getting Errors

Posted: Wed Nov 25, 2015 11:26 am
by gorre9090
so I am trying to make a mod but in the recipe.lua file I am getting an error from the game.

_UpgradedElectricPoles_/prototypes/recipe.lua:36: ')' expected (to close ')' at line 1) near '}'
data:extend({
{
type = "recipe",
name = "upgraded-small-electric-pole",
enabled = true,
ingredients =
{
{"wood", 4}},
{"copper-cable", 4}
},
result = "upgraded-small-electric-pole",
result_count = 2
},
{
type = "recipe",
name = "upgraded-big-electric-pole",
enabled = true,
ingredients =
{
{"steel-plate", 10},
{"copper-plate", 10}
},
result = "upgraded-big-electric-pole",
},
{
type = "recipe",
name = "upgraded-medium-electric-pole",
enabled = true,
ingredients =
{
{"steel-plate", 4},
{"copper-plate", 4}
},
result = "upgraded-medium-electric-pole",
}
})

Re: New Modder Getting Errors

Posted: Wed Nov 25, 2015 12:03 pm
by daniel34
gorre9090 wrote:

Code: Select all

    ingredients =
    {
      {"wood", 4}},
      {"copper-cable", 4}
    },
Nut sure if that is the only error (i didn't run it), but there are two } after the wood ingredient when there should only be one.

I recommend an editor with syntax highlighting (such as Notepad++) if you don't already use one, it makes it easier to spot such errors.

Re: New Modder Getting Errors

Posted: Wed Nov 25, 2015 12:19 pm
by gorre9090
i have notepad++ but not sure how to do syntax error highlighting? i fixed it and then i had to deal with other errors in different files and setting up a locale xD

Re: New Modder Getting Errors

Posted: Wed Nov 25, 2015 1:53 pm
by prg
hl.png
hl.png (99.81 KiB) Viewed 4866 times
I guess Notepad++ would have something similar.

Re: New Modder Getting Errors

Posted: Wed Nov 25, 2015 2:19 pm
by Kayanor
prg wrote:I guess Notepad++ would have something similar.
Image
Eeyup, it's turned on by default. I think.