If I have a list of items like this:
local items = { \"apple\", \"orange\", \"pear\", \"banana\" }
how do I check if \"orange\" is in this
function valid(data, array) local valid = {} for i = 1, #array do valid[array[i]] = true end if valid[data] then return false else return true end end
Here's the function I use for checking if data is in an array.