From be3c76545f1796cbfc60629d7a8c830cb499d80b Mon Sep 17 00:00:00 2001 From: wxd-gaming <492794628@qq.com> Date: Thu, 10 Oct 2024 19:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua-test/lua/script/2/test2.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua-test/lua/script/2/test2.lua b/lua-test/lua/script/2/test2.lua index 74526c3..e29121b 100644 --- a/lua-test/lua/script/2/test2.lua +++ b/lua-test/lua/script/2/test2.lua @@ -11,12 +11,17 @@ function t3(str) end function testNow(map) + argsTest(1, "3") print(" lua now - " .. ret(map)) print(" lua now - " .. ret(map["now"])) print(" lua nowsec - " .. ret(map["nowsec"])) print("lua math.ceil - " .. ret(math.ceil(map["now"] / 1000))) end +function argsTest(...) + gameDebug.assertTrue(1 == 2, "参数异常", ...) +end + function ret(obj) local success, ret = pcall(function() return "dd - " .. obj