|
按前辈做的一段接标脚本,老是报错,以下是脚本
-------------------------------------------------------
get_best_quest = function (listesc)
tprint(listesc)
local available_quest = ()
for i, v in pairs(listesc) do
---print(v.place)
----print("from",GetVariable("hubiao_from"),"to", v.place)
if path_hubiao[GetVariable("hubiao_from")][v.place] and path_bianli[v.place]then
table.insert(available_quest, (no = v.no, place = v.place))
--return v.no, v.place
end
end
if #available_quest == 0 then
print("没有合适任务")
return
end
local m = 0
local best = 1
tprint(available_quest)
for i2, v2 in pairs(available_quest) do
n = #path_hubiao[GetVariable("hubiao_from")][v2.place]
if n < m then
m = n
best = v2.no
end
end
return available_quest[best].no, available_quest[best].place
end
----------------------------
不知道是符号错了还是什么错了,求前辈们看看,报错代码
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:240: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:240: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:238: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:238: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:238: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command
>lua -e "io.stdout:setvbuf 'no'" "护镖脚本.lua"
lua: 护镖脚本.lua:238: unexpected symbol near ')'
>Exit code: 1
> Lua: error checking global scope for command |
|