【发布时间】:2021-08-25 11:29:14
【问题描述】:
所以,我有一个表格,大致如下:
PlaneToolTip= {['Vickers_0']={title="Vickers F.B.5 Gunbus", text="Vickers F.B.5 Gunbus Variant", row="Vickers", image="planes_creation"},
['Vickers_1']={title="Vickers F.B.5 Gunbus", text="Vickers F.B.5 Gunbus Variant 1", typeguid="7a5d62", image="Vickers F.B.5 Gunbus Variant 1"},
['Morane_0']={title="Morane Saulnier Type N", text="Morane Saulnier Type N Variant", row="Morane", image="planes_creation"},
['Morane_1']={title="Morane Saulnier Type N", text="Morane Saulnier Type N Variant 1", typeguid="dbf582", image="Morane Saulnier Type N Variant 1"},
['Morane_2']={title="Morane Saulnier Type N", text="Morane Saulnier Type N Variant 2", typeguid="73c10f", image="Morane Saulnier Type N Variant 2"}}
你好,我用的是Lua(Tabletopsimulator),想在表格中搜索一些东西,比如“title”。
for a, b in pairs (PlaneToolTip) do
for b, c in pairs (PlaneToolTip [a]) do
if c == "Morane Saulnier Type N" then
...
end
end
end
然后它应该输出所有合适的“typeguid”。如“dbf582”、“73c10f”。
感谢您的帮助 拉多安
【问题讨论】: