New Modder Getting Errors

Place to get help with not working mods / modding interface.
Post Reply
gorre9090
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Nov 23, 2015 12:17 pm
Contact:

New Modder Getting Errors

Post 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",
}
})

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: New Modder Getting Errors

Post 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.
quick links: log file | graphical issues | wiki

gorre9090
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Nov 23, 2015 12:17 pm
Contact:

Re: New Modder Getting Errors

Post 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

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: New Modder Getting Errors

Post by prg »

hl.png
hl.png (99.81 KiB) Viewed 4858 times
I guess Notepad++ would have something similar.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

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

Re: New Modder Getting Errors

Post by Kayanor »

prg wrote:I guess Notepad++ would have something similar.
Image
Eeyup, it's turned on by default. I think.
Former moderator.

Post Reply

Return to “Modding help”