|
|
||
|
> Lua:
> mylist = {"a", "b", "c"};
> a = "a"
> if mylist[a] ~= nil then
> print "a is in the list"
> end
Did you try it? In Lua the table
{"a", "b", "c"}
is the same as
{[1] = "a", [2] = "b", [3] = "c"}
which only has numeric keys, so there is no key "a".
--
Wim