--The view of the table
local originalStats = {
Info = {Visit = false, Name = "None", Characters = 1},
Stats = {Levels = 0, XP = 0, XP2 = 75, Silver = 95},
Inventory = {
Hats = {"NoobHat"},
Robes = {"NoobRobe"},
Boots = {"NoobBoot"},
Weapons = {"NoobSword"}
}
}
local tempData = {}
--The arrangement here
function Module:ReadAll(player)
for k,v in pairs(tempData[player]) do
if type(v) == 'table' then
for k2, v2 in pairs(v) do
print(k2) print(v2)
if type(v2) == 'table' then
for k3, v3 in pairs(v2) do
print(k3) print(v3)
end
else
print(k2) print(v2)
end
end
else
print(k) print(v)
end
end
end
私は申し訳ありませんが、この「ReadAll」機能を正しい順序ですべての正しい統計情報を表示する場所に配置する方法がわかりません。 。このテーブルの配置を理解できません
Boots
table: 1A73CF10
1
NoobBoot
Weapons
table: 1A7427F0
1
NoobSword
Robes
table: 1A743D50
1
NoobRobe
Hats
table: 1A73C9D0
1
NoobHat
XP2
75
XP2
75
Levels
2
Levels
2
XP
0
XP
0
「正しい順序で」を意味しますか?どのような順序が正しいですか?希望の出力は何ですか? –
私はinfo、stats、hats、robes、boots、weaponsのすべての値を同じ値を繰り返して出力したいのですが、どうすればいいですか?私は数時間それをテストするが、それは私が持っているすべてです。 –
入力テーブル(tempData [player])と取得したい出力の例を挙げてください。 –