attempt to index field 'global' (a nil value)
I am trying to configure in game settings for my mod, but i have to create a string from the number inputted with MJ concatenated to it.
I have the setting type as an int and runtime-global.
Code: Select all
EV = settings.global["epic_robot_energy-Multi"].value
data.raw["logistic-robot"]["logistic-robot"].max_energy = (tostring(EV) .. "MJ")
data.raw["construction-robot"]["construction-robot"].max_energy = (tostring(EV) .. "MJ")