Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Count the number of times a value occurs in a table
- function table_count(tt, item)
- local count
- count = 0
- for ii,xx in pairs(tt) do
- if item == xx then count = count + 1 end
- end
- return count
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement