帮忙看看这句哪有语法问题,普通的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行 展开
总是提示
23: '}' expected near '='
上面的就是第23行 展开
展开全部
你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}}
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}}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询