Module:LuaCall: Difference between revisions

From Test Wiki
Content deleted Content added
Need to check there's a period in the function name BEFORE the first match attempt
How did I foul that up? It was too simple to foul up... Undid revision 585493232 by Wnt (talk)
Line 29: Line 29:
end
end
local reserved_arraypart=_G
local reserved_arraypart=_G
repeat
while not mw.ustring.match(reserved_function,"%.") do
reserved_functionpart,reserved_function=mw.ustring.match(reserved_function,"^(%a[^%.]*)%.(.*)$")
reserved_functionpart,reserved_function=mw.ustring.match(reserved_function,"^(%a[^%.]*)%.(.*)$")
reserved_arraypart=reserved_arraypart[reserved_functionpart]
reserved_arraypart=reserved_arraypart[reserved_functionpart]
until not mw.ustring.match(reserved_function,"%.")
end
local reserved_call=reserved_arraypart[reserved_function]
local reserved_call=reserved_arraypart[reserved_function]
if type(reserved_call)~="function" then
if type(reserved_call)~="function" then