如何迭代主表下存在的表参数?
在lua中,我调用一个函数,该函数返回一个内部包含许多参数的表变量。但是当我获得该值时,我无法访问表中存在的参数。我可以在原始函数中看到tables参数,其形式为
[[table:0x0989]] { [[表:0x23456]] str =“你好” 宽度=180 }, [[表:0x23489]] { str1 =“世界” 它显示如下。但是
当它返回时,我可以获得像 [[table:0x0989]] 这样的表的顶部地址。当我尝试访问主表中存在的表时。它显示为零价值...我该怎么称呼它?有人可以帮助我吗?
In lua ,im calling a function which returns a table variable that contains many parameter internally..but when i get that value i couldnt access the paramter which is present in the table. I can see the tables parameter in the original function in the form of
[[table:0x0989]]
{
[[table:0x23456]]
str = "hello"
width = 180
},
[[table:0x23489]]
{
str1 = "world"
}
it shows like this.but when it returns once i can able to get the top address of table like [[table:0x0989]]..when i tried acessing the tables which is present inside the main table.it is showing a nil value...how do i call that ?? can anyone help me??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没读错的话,你正在这样做:
从那你应该能够做到这一点:
然后
If I'm reading it correctly you're doing this:
From that you should be able to do this:
then