When using the Lua 5.2 API, the code below prints "nil"
function __debug(szName, ...) print(type(arg)); end __debug("s", 1, 2, 3, 4);
But this code works when using Lua 5.1 and prints a "table"
If you reference the vararg function, the arg table was deprecated already in Lua 5.1 . In Lua 5.2, you can use table.pack to create arg if you need it:
arg
table.pack
function debug(name, ...) local arg = table.pack(...) print(name) for i=1,arg.n do print(i, arg[i]) end end
This is because arg deprecated since Lua 5.1. It remained only as a function of compatibility.
References: Lua 5.1 Manual , unofficial LuaFaq
the workaround uses this line to create the arg table:
local arg={...}
Source: https://habr.com/ru/post/1402419/More articles:Moq and Moq Options - moqConvert Arabic to English - vb.netAt the same time, more than one service provider - androidWhen you write httpResponse, is there a limit on the size of the response? - c #How to convert date and time in SQL Server - sql"size_t" as a type parameter, the throw warning does not play - c ++How to save source datetimes file when using Mercurial? - mercurialhow to remove quotation from variables forfiles - variablesHow to implement image gallery (local images) - androidhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1402424/list-of-tuples-to-just-list-using-map-haskell&usg=ALkJrhi3ZSEvQRXr86V9PWk54laqxTXg2AAll Articles