[Solved] How to fix attempt to index field 'player' (a nil value)?
Posted: Sun Jun 09, 2019 5:47 pm
I had some simple mods that worked in v0.16.
All of them now fail with this error message : attempt to index field 'player' (a nil value)
This is where it fails in one of the mods in data.lua:
Another of the mods fails here in data.lua:
Yet another mod has this in data.lua:
And finally, another has this in data-final-fixes.luq:
Everywhere 'player' is used it now fails. How can I change them to get them working again?
Thanks in advance for the help!
All of them now fail with this error message : attempt to index field 'player' (a nil value)
This is where it fails in one of the mods in data.lua:
Code: Select all
data.raw.player.player.running_speed
Code: Select all
data.raw["player"]["player"].reach_distance = 10000
Code: Select all
local mplayer = util.table.deepcopy(data.raw["player"]["player"])
mplayer.collision_box = {{0,0},{0,0}}
data:extend{mplayer}
Code: Select all
data.raw["player"]["player"].inventory_size = my_inventory_size
Everywhere 'player' is used it now fails. How can I change them to get them working again?
Thanks in advance for the help!