table.maxn and # search for numeric indices; they will not see your string indexes.
As for getting the number of elements in an array with arbitrary indices, I would probably skip the array using something like:
Count = 0
for Index, Value in pairs( Victim ) do
Count = Count + 1
end
but i'm an idiot.
source
share