local Table = {Sao = 'S',Sao = 'U',Sao = 'C',Sao = 'K',Sao = 'S'}
for i,v in pairs(Table) do
print(i)
end
--Only Prints Sao Once I want it to print 5 times
--[[ --]]
--What Im triyng to do
local Table = {Sao = 'S',Sao = 'U',Sao = 'C',Sao = 'K',Sao = 'S'}
local AmountOfSao = 0
for i,v in pairs(Table) do
if i == 'Sao' then
AmountOfSao = AmountOfSao + 1
end
end
print(AmountOfSao) -- Should print 5
Basically I want to add all the index up and print a number how how many same indexes there are
AmountOfSao should print 5

1 comment
Sao is all the same. Like I think all this does is change what Sao in the table so there is only one (I think). So like you need to have everything different.