That was most likely confusing because letters are very missleading and hard to understand if not used in set structure. Thank goodness we have coding as a medium.
Here's the gist of my set up problem
Code: Select all
colors.colorCode = {255, 255, 255, 255} --Here's something I want to change indirectly
function createobject(param) --let's create a very basic object class
local obj = {}
obj.target = param
return obj
end
function changeparam(data, value) --This will basically change the object's target value, However I want it to also change it's target
data.target = value
end
anobject = createobject(colors.colorCode[1]) --Giving the object it's target parameter to change
changeparam(anobject, 0) --Will change it's target key's value to 0, yet I want it to change colors.colorCode[1] to 0