I wanted to ask if there is a way to check what index the value in the table is
for example,
t = {}
table.insert(t,"Hello")
table.insert(t,"HELLO")
table.insert(t,"HI")
if index==1 and value=="HI" then -- false
--do something
elseif index==0 and value=="HELLO" then --false
--do something
elseif index==2 and value=="HI" then --true
--do something
else --etc.
--do something
end
--If someone does not distinguish the index from the value then the index is for example [0,1,2,3 ...] and the value is an element for example
print(t[1]) -------------> 'HELLO'