Search found 3 matches

by XIAIX
Wed Jan 29, 2020 10:28 pm
Forum: Modding help
Topic: attempt to index global 'sounds' (a nil value)
Replies: 3
Views: 1435

Re: attempt to index global 'sounds' (a nil value)

Well, that was it. Thank you!
Using "__base__." was what I needed. :D

Oh, I also took it out of the control.lua file and put it in the data.lua:

local sounds = require("__base__.prototypes.entity.demo-sounds")
local hit_effects = require ("__base__.prototypes.entity.demo-hit-effects")
data:extend ...
by XIAIX
Tue Jan 28, 2020 11:13 pm
Forum: Modding help
Topic: attempt to index global 'sounds' (a nil value)
Replies: 3
Views: 1435

Re: attempt to index global 'sounds' (a nil value)

I changed this: local hit_effects = require ("prototypes.entity.demo-hit-effects")
to this: local hit_effects = game.prototype_entity["demo-hit-effects"]

and this: local sounds = require ("prototypes.entity.demo-sounds")
to this: local sounds = game.prototype_entity["demo-sounds"]

Still no go ...
by XIAIX
Tue Jan 28, 2020 10:49 pm
Forum: Modding help
Topic: attempt to index global 'sounds' (a nil value)
Replies: 3
Views: 1435

attempt to index global 'sounds' (a nil value)

With 0.18.2, they added damaged_trigger_effect = hit_effects.entity()
to "C:\Program Files (x86)\Steam\steamapps\common\Factorio\data\base\prototypes\entity\demo-turrets.lua"

Well, I have a Gun turret mod that won't load now.

The mod has a control.lua that has these 2 lines:
local hit_effects ...

Go to advanced search