Hi all! What I want to do is take a table of strings, and use them as values. This way, I don't need two tables with variables, and then strings. Here's my table
local MenuValues = {"MainMenu", "Episodes"}
function GetMenu()
for slot=1, #MenuValues do
if (MenuValues[slot]) == true then --This is what I've got so far, but it doesn't work
end
end
end
I've done something something similar in the past, but it used global variables. Here it is for reference
Modes = {"Easy", "Normal", "Colored", "Hard", "Nightmare"}
function ResetMode()
for i,v in pairs(Modes) do
_G[Modes[i]] = false
end
end
Any help is appreciated!

5 comments
What do you mean by 'use them as values' ? The problem with line 5 is that the index is a string, and you're trying to compare it with a bool. The value will never be 'true' and therefore your code never continue.
Please look at the example I show with global variables? Do I have to use global variables to do this again, or can I do it with inscript variables
@Goulstem Actually, Lua considers strings as true.
really o:
Neat! http://prntscr.com/c9glx3 :D I didn't know that.