Mod Error

Place to get help with not working mods / modding interface.
Post Reply
RedMoo
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Sep 09, 2016 10:51 pm
Contact:

Mod Error

Post by RedMoo »

I'm very new to modding and I used a guide for this but I keep getting an error saying:
Failed to load mod "Super Inserter 0.1.0"
__Super_Inserter__/data.lua:2:
__Super_Inserter__/prototypes/entity.lua:84: "}" expected (to close "{" at line 1) near ')'

The code is right here
Thanks

Code: Select all

data:extend({
    type = "inserter",
    name = "super-inserter",
    icon = "__base__/graphics/icons/fast-inserter.png",
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    minable =
  {
      hardness = 0.2,
      mining_time = 0.5,
      result = "super-inserter"
  },
    max_health = 40,
    corpse = "small-remnants",
    resistances =
  {
      {
        type = "fire",
        percent = 90
      }
  },
    collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
    selection_box = {{-0.4, -0.35}, {0.4, 0.45}},
    pickup_position = {0, -1},
    insert_position = {0, 1.2},
    energy_per_movement = 7000,
    energy_per_rotation = 7000,
    energy_source =
  {
      type = "electric",
      usage_priority = "secondary-input",
      drain = "0.5kW"
  },
    extension_speed = 0.07,
    rotation_speed = 0.04,
    fast_replaceable_group = "inserter",
    vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
    working_sound =
  {
      match_progress_to_activity = true,
      sound =
      {
        {
          filename = "__base__/sound/inserter-fast-1.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-2.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-3.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-4.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-5.ogg",
          volume = 0.75
        }
      }
  },
    hand_base_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-base.png",
      priority = "extra-high",
      width = 8,
      height = 34
  },
    hand_closed_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-closed.png",
      priority = "extra-high",
      width = 18,
      height = 41
  },
    hand_open_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-open.png",
      priority = "extra-high",
      width = 18,
      height = 41
})

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: Mod Error

Post by Smarty »

Moved to modding help

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 343
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Mod Error

Post by LuziferSenpai »

RedMoo wrote:I'm very new to modding and I used a guide for this but I keep getting an error saying:
Failed to load mod "Super Inserter 0.1.0"
__Super_Inserter__/data.lua:2:
__Super_Inserter__/prototypes/entity.lua:84: "}" expected (to close "{" at line 1) near ')'

The code is right here
Thanks

Code: Select all

data:extend({
    type = "inserter",
    name = "super-inserter",
    icon = "__base__/graphics/icons/fast-inserter.png",
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    minable =
  {
      hardness = 0.2,
      mining_time = 0.5,
      result = "super-inserter"
  },
    max_health = 40,
    corpse = "small-remnants",
    resistances =
  {
      {
        type = "fire",
        percent = 90
      }
  },
    collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
    selection_box = {{-0.4, -0.35}, {0.4, 0.45}},
    pickup_position = {0, -1},
    insert_position = {0, 1.2},
    energy_per_movement = 7000,
    energy_per_rotation = 7000,
    energy_source =
  {
      type = "electric",
      usage_priority = "secondary-input",
      drain = "0.5kW"
  },
    extension_speed = 0.07,
    rotation_speed = 0.04,
    fast_replaceable_group = "inserter",
    vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
    working_sound =
  {
      match_progress_to_activity = true,
      sound =
      {
        {
          filename = "__base__/sound/inserter-fast-1.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-2.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-3.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-4.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-5.ogg",
          volume = 0.75
        }
      }
  },
    hand_base_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-base.png",
      priority = "extra-high",
      width = 8,
      height = 34
  },
    hand_closed_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-closed.png",
      priority = "extra-high",
      width = 18,
      height = 41
  },
    hand_open_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-open.png",
      priority = "extra-high",
      width = 18,
      height = 41
})

Yes ...

Code: Select all

data:extend({
    type = "inserter",
    name = "super-inserter",
    icon = "__base__/graphics/icons/fast-inserter.png",
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    minable =
  {
      hardness = 0.2,
      mining_time = 0.5,
      result = "super-inserter"
  },
    max_health = 40,
    corpse = "small-remnants",
    resistances =
  {
      {
        type = "fire",
        percent = 90
      }
  },
    collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
    selection_box = {{-0.4, -0.35}, {0.4, 0.45}},
    pickup_position = {0, -1},
    insert_position = {0, 1.2},
    energy_per_movement = 7000,
    energy_per_rotation = 7000,
    energy_source =
  {
      type = "electric",
      usage_priority = "secondary-input",
      drain = "0.5kW"
  },
    extension_speed = 0.07,
    rotation_speed = 0.04,
    fast_replaceable_group = "inserter",
    vehicle_impact_sound =  { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
    working_sound =
  {
      match_progress_to_activity = true,
      sound =
      {
        {
          filename = "__base__/sound/inserter-fast-1.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-2.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-3.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-4.ogg",
          volume = 0.75
        },
        {
          filename = "__base__/sound/inserter-fast-5.ogg",
          volume = 0.75
        }
      }
  },
    hand_base_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-base.png",
      priority = "extra-high",
      width = 8,
      height = 34
  },
    hand_closed_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-closed.png",
      priority = "extra-high",
      width = 18,
      height = 41
  },
    hand_open_picture =
  {
      filename = "__base__/graphics/entity/fast-inserter/fast-inserter-hand-open.png",
      priority = "extra-high",
      width = 18,
      height = 41
 } <-- This is missing
})
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

RedMoo
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Sep 09, 2016 10:51 pm
Contact:

Re: Mod Error

Post by RedMoo »

oh lol thanks

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Mod Error

Post by aubergine18 »

@RedMoo: A good way to track down errors like that is with a linter - it will show you exactly where the problem is while you're editing the script: viewtopic.php?f=34&t=29919
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: Mod Error

Post by Helfima »

or eclipse with lua plugin, i like
viewtopic.php?f=34&t=29919&p=204969#p204969

Post Reply

Return to “Modding help”