However, when I use
print(#HOLDERTABLE), the returned value is 0. I was wondering why the HOLDERTABLE does not consider the two holder values as members of the HOLDERTABLE, and what could be done to work around this issue.
The length operator only works for arrays, not dictionaries. If you want to see the length of a dictionary you have to do something like this:
local function GetLengthOfDictionary(t)
local keys = {}
for key in t do
-- insert the index into the keys table
table.insert(keys, key)
end
return #keys -- return the length of the keys array
end