I am having a mental BLANK. How can I find something in a table for example a randomally generated key which I have put in there.
Find String in Table
Started by Left, Mar 22 2013 11:37 PM
2 replies to this topic
#1
Posted 22 March 2013 - 11:37 PM
#2
Posted 23 March 2013 - 12:00 AM
This would give you the Place where the searched String is in the table.
Greets Loki
local items = { "Hugo", "Karl", "Geerd", "Bananarama" }
for k, v in pairs(items) do
if v == "Bananarama" then
print(k)
break --delete this if there are multiple entries
end
end
Greets Loki
#3
Posted 23 March 2013 - 12:08 AM
Thanks. Again about 2:30, I am tired. Goodnight! No moar dev for tonight. I may not be on until the 28th because I will not get my internet back until then!
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users











