I made a program, which checks if in table has (for example) "A" and a "B" in itself. But it doesn't works.
Here's code:
function inTable(t,e)
return t[e] ~= nil
end
--Example
local table_ = {"A","B"}
if inTable(table_,"A") and inTable(table_,"B") then
--Do some stuff
end
Please, help me.
I tried everything but it still doesn't work.
local table_ = {["A"]=1,["B"]=1}and your code will work.