How to check in Lua if there are multiple elements in a table?

Advertisements 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… Read More How to check in Lua if there are multiple elements in a table?

I don't Understand "How Lua save data on the same variable when we Iterate over it"

Advertisements I know Lua remember value in the same field/function with the Same defined Variable. but I still lack the concept behind it. Let’s say I’see Int Variable = 2 which can be modify if we iterate over it Int variable = 8 Same logic I was applying on the Code. I got the results,… Read More I don't Understand "How Lua save data on the same variable when we Iterate over it"