Error: '}' expected (to close '{' at line 3) near = (solved)
Posted: Sat Nov 19, 2016 10:56 pm
Hello, I am new to modding in factorio. I was testing my first mod and got this error. I am trying to make a nuclear cannon that shoots a missile to anywhere in the map. I tried to fix it but i couldn't find anywhere what was causing the error. The error occurred in the entity.lua file
When opening factorio it shows __Nuclearcannon__/prototypes/entity.lua:21: '}' expected (to close '{' at line 3)
Here is the code:
data:extend{
(
{
type = "electric-turret",
name = "Nuclear-cannon",
icon = "__Nuclearcannon__/graphics/entity/nuclearcannon.png",
flags = {"player-creation", "placeable-neutral"},
minable = {hardness = 0.2, mining_time = 3, result = "Nuclear-cannon"},
max_health = Health.Tier8,
resistances = Resistances.Tier6,
corpse = "medium-remnants",
selection_box = {{-1.2, -1,2}, {1.2, 1.2}},
collision_box = {{-0.7, -0,7}, {0.7, 0.7}},
vehicle_impact_sound = {filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65},
rotation_speed = 0.5,
preparing_speed = 0.75,
folding_speed = 0.25,
dying_explosion = "big-explosion",
inventory_size = 1,
automated_ammo_count = 5,
energy-source =
{
type = "electric",
buffer_capacity = "500kJ",
emmisions = 0.067 / 1.5,
usage_priority = "secondary-input",
},
energy_usage = "1,5mW"
}
}
)
When opening factorio it shows __Nuclearcannon__/prototypes/entity.lua:21: '}' expected (to close '{' at line 3)
Here is the code:
data:extend{
(
{
type = "electric-turret",
name = "Nuclear-cannon",
icon = "__Nuclearcannon__/graphics/entity/nuclearcannon.png",
flags = {"player-creation", "placeable-neutral"},
minable = {hardness = 0.2, mining_time = 3, result = "Nuclear-cannon"},
max_health = Health.Tier8,
resistances = Resistances.Tier6,
corpse = "medium-remnants",
selection_box = {{-1.2, -1,2}, {1.2, 1.2}},
collision_box = {{-0.7, -0,7}, {0.7, 0.7}},
vehicle_impact_sound = {filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65},
rotation_speed = 0.5,
preparing_speed = 0.75,
folding_speed = 0.25,
dying_explosion = "big-explosion",
inventory_size = 1,
automated_ammo_count = 5,
energy-source =
{
type = "electric",
buffer_capacity = "500kJ",
emmisions = 0.067 / 1.5,
usage_priority = "secondary-input",
},
energy_usage = "1,5mW"
}
}
)