It's _G["test"].three not _G["test.three"].
if you replace function test.three() end with _G["test.three"] = function() end then it should work perfectly, although I don't think thats what you were looking for.
Here's a simple solution replace
Code:
func = _G[Functions[somevalue]]
with
Code:
func = loadstring("return "..Functions[somevalue])())
or you can use string.gmatch the advantage being theres no wrapper function created:
Code:
Functions = {[1] = "foo.bar"}
foo = {}
function foo.bar()
end
local tbl = _G
for var in string.gmatch(Functions[1], "([^%.%[%]\"\']+)") do
tbl = tbl[var]
end
print(tbl == foo.bar)
Would output true
Hope this helps.