I’ve been struggling with this problem for a while and couldn’t find answers anywhere as I don’t know the correct terminology on this issue:
I have a table named “items”, which among other properties has the following property:
items.quantity = 4
Now I want to read that values with a function that takes the class property (quantity) as a string:
getItemProperty({property = “quantity”})
and the function should search the class for a property named “quantity” and return it. I can’t figure out the correct syntax. How is this done? items.quantity gives the output of 4 so the table is fine.
I’ve already tried the following syntax with no success
function getItemProperty(parameters)
{
local value = items.‘parameters.property’
return value
}