|
楼主 |
发表于 2008-10-21 09:23:57
|
显示全部楼层
找到原因了,在mushclient的官方forum上
原因是lua过时了 -_-
The PIL is outdated, and describes Lua 5.0.x and not 5.1.x. In Lua 5.1.x the syntax changed so that arg does not exist anymore. Rather, you can get the various arguments through the {...} specifier. In my case, I solved it as follows:
printResult = ""
function print (...)
local arg = {...}
for i,v in ipairs(arg) do
printResult = printResult .. tostring(v) .. "\t"
end
printResult = printResult .. "\n"
end
用下面语句测试OK
/function tt(...) for i,v in pairs({...}) do print(i,v) end; end; tt(1,2,3)
结贴,呵呵 |
|