无法打印Lua表键\索引和值

问题描述

从游戏API(《魔兽世界》)收到的表格会整体打印以下结果

local sometbl = APICommand("args");
print(sometbl) --prints table: 000001F492F31.... 

基本上是我假定的一些内存地址。

尝试使用print(sometbl [1])或print(sometbl [2])时,输出为nil

正在尝试

for key,value in next,sometbl do
    print(key .. " ".. value)
end

OR

for key,value in pairs(sometbl) do
    print(key .. " ".. value)
end

OR

for key,value in ipairs(sometbl) do
    print(key .. " ".. value)
end

这些都不产生任何输出。

the print(sometbl) still prints said memory reference

如何打印该特殊表的全部内容?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)