帮忙看看这句哪有语法问题,普通的lua赋值

localt={1={map_id=20300,x=46,y=253},2={map_id=20300,x=148,y=190},3={map_id=20100,x=12... local t = {1 = {map_id = 20300, x = 46, y = 253}, 2 = {map_id = 20300, x = 148, y = 190}, 3 = {map_id = 20100, x = 124, y = 38}, 4 = {map_id = 20309, x = 23, y = 102}, 5 = {map_id = 20307, x = 18, y = 72}, 6 = {map_id = 20300, x = 139, y = 575}, 7 = {map_id = 20300, x = 57, y = 504}}
总是提示
23: '}' expected near '='
上面的就是第23行
展开
 我来答
jayhou1986
2011-05-19 · TA获得超过1511个赞
知道小有建树答主
回答量:586
采纳率:81%
帮助的人:416万
展开全部
你table的用法不对,应该加上方括号:
local t = {[1] = {map_id = 20300, x = 46, y = 253},
[2] = {map_id = 20300, x = 148, y = 190},
[3] = {map_id = 20100, x = 124, y = 38},
[4] = {map_id = 20309, x = 23, y = 102},
[5] = {map_id = 20307, x = 18, y = 72},
[6] = {map_id = 20300, x = 139, y = 575},
[7] = {map_id = 20300, x = 57, y = 504}}
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式