Hey guys,
how can I make table.find find my table by the user
local mytable = {
{user = "LOL", timer = 0},
{user = "XD", timer = 1},
}
print(table.find(mytable,"LOL")) -- should print 1
Hey guys,
how can I make table.find find my table by the user
local mytable = {
{user = "LOL", timer = 0},
{user = "XD", timer = 1},
}
print(table.find(mytable,"LOL")) -- should print 1
Can’t use table.find on dictionaries
local mytable = {
{user = "LOL", timer = 0},
{user = "XD", timer = 1},
}
local foundIndex = nil
for i, dictionary in mytable do
if dictionary.user ~= "LOL" then
continue
end
foundIndex = i
break
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.