Module:LuaCall: Difference between revisions

From Test Wiki
Content deleted Content added
p.call(), more complex debugging example
use vararg for pairs() result
Line 46: Line 46:
end
end


local function tonumberOrStringOnPairs(f, s, i)
local function tonumberOrStringOnPairs(...)
local args = {}
local args = {}
for _, v in f, s, i do
for _, v in ... do
--table.insert(args, tonumber(v) or v:gsub("^\\", "", 1))
--table.insert(args, tonumber(v) or v:gsub("^\\", "", 1))
table.insert(args, tonumberOrString(v))
table.insert(args, tonumberOrString(v))