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 does work when using Lua 5.1, and prints “table”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are referring to vararg function, the
argtable was deprecated already in Lua 5.1. In Lua 5.2, you can usetable.packto createargif you need it: