Originally Posted by Sharlikran
Lua Code:
Harvest.DataStore_en_auridon_base Harvest.DataStore.en.auridon.base
Ok I am confused. What is the difference between the two lines. ESO told me I was trying to access a nil value with the line that has the dots in it. Do this dots make Lua think it's a function? The other line works.
|
The second are table references, the first is a single variable.
Essentially:
Code:
Harvest.DataStore.en.auridon.base
is
Code:
Harvest = {}
Harvest["DataStore"] = {}
Harvest["DataStore"]["en"] = {}
Harvest["DataStore"]["en"]["auridon"] = {}
Harvest["DataStore"]["en"]["auridon"]["base"] = {}
Code:
Harvest.DataStore_en_auridon_base
is
Code:
Harvest = {}
Harvest["DataStore_en_auridon_base"] = {}
You have to create the table before you can add further items to it otherwise you'll get a nil reference.
I suggest you read up on Lua,
PiL is a good resource to learn the syntax of Lua