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 ...
Search found 3 matches
- Wed Jan 29, 2020 10:28 pm
- Forum: Modding help
- Topic: attempt to index global 'sounds' (a nil value)
- Replies: 3
- Views: 1435
- 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 ...
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 ...
- 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 ...
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 ...