lua 中多维数组的使用

 1、三维数组的使用

	local bGameCount = dataBuffer:readbyte()
	
	local int64 = Integer64:new()
	
	local cbCardCount = 5
	local cbHandCardData = {}
	local lGameScore = {}	

    for i=1,bGameCount do
		cbHandCardData[i]={}
		for j=1,cmd.GAME_PLAYER do
			cbHandCardData[i][j]={}
			for k=1,cbCardCount do
				cbHandCardData[i][j][k]=dataBuffer:readbyte()
			end
		end
	end
	
	for i=1,bGameCount do
		lGameScore[i]={}
		for j=1,cmd.GAME_PLAYER do
			lGameScore[i][j]=dataBuffer:readscore(int64):getvalue()
		end
	end

 

你可能感兴趣的:(Lua)