lua动态参数

function LuaError(...)
	local strContent=""
	for i=1,arg.n,1 do
		strContent = tostring(strContent)..tostring(arg[i])
		if i ~= arg.n then 
		strContent = strContent..","
		end
	end
	Log:Instance():WriteLogStr(enLogType_Error,strContent)
end

 如果arg.n报错就用这个

comFuc.error = function(...)
	local arg = {...}
	local strContent=""
	for i=1,#arg,1 do
		strContent = tostring(strContent)..tostring(arg[i])
		if i ~= #arg then 
		strContent = strContent..","
		end
	end
	gLog.error("%s", strContent)
end

 

posted @ 2013-02-25 16:48  byfei  阅读(690)  评论(0编辑  收藏  举报