I'm trying to initialize a table of default properties for my script, and I'm facing the following scenario:
_property_table = {
k1 = "val1",
k2 = "val2",
k3 = k1 .. "val3",
}
print(_property_table.k3)
When trying to concatenate k1 within the table constructor, lua fails with the following error:
_impl error: [string "main.lua"]:10: attempt to concatenate global 'k1' (a nil value)
Is this behavior expected, or am I missing something?
I'm fairly new to Lua, so any tips or suggestions on how to proceed would be appreciated.
Thanks