Page 1 of 1

Crash when hovering over item [SOLVED]

Posted: Tue Nov 22, 2016 4:26 pm
by Sigma1
I have been developing a mod for a while now, and I added a new ammo type item, and it appears in the game correctly but if I hover over it in the inventory it crashes the game.

Code probably causing error:

Code: Select all

--stone
	{
		  type = "ammo",
		  name = "rock",
		  icon = "__military-extended__/graphics/ammo/stone.png",
		  flags = {"goes-to-main-inventory"},
		  ammo_type =
    {
      category = "throwable",
      action =
      {
        {
          type = "direct",
          action_delivery =
          {
            type = "instant"
          }
        },
        {
          type = "direct",
          action_delivery =
          {
            type = "projectile",
            projectile = "stone",
            starting_speed = 0.8,
            max_range = 22
          }
        }
      }
    },
    magazine_size = 1,
    subgroup = "ammo",
    order = "d[rock]",
    stack_size = 100
  },
Factorio log file is as an attachment.

Any help is appreciated

Re: Crash when hovering over item

Posted: Tue Nov 22, 2016 5:38 pm
by Rseding91
This is fixed in 0.15:

You've made a projectile trigger but gave it an entity name that isn't a projectile.

Re: Crash when hovering over item

Posted: Tue Nov 22, 2016 5:48 pm
by Sigma1
Thanks for the quick reply :D! I should rename my stone projectile and make sure that it is the correct type.