Originally Posted by Garkin
So you probably want something like:
Lua Code:
local channelTable = {} for key, value in zo_insecurePairs(_G) do if (kepy):find("^CHAT_CATEGORY_") and not (key):find("HEADER") then channelTable[value] = key end end
|
Looks like actually going over the entire global table is the only way to get those.
Found the documentation for find/attern:
http://lua-users.org/wiki/PatternsTutorial
The ^ makes certain only the start of the string is checked (improoving performance). Have to test that code when I am home again.