dengtaliyi 发表于 2021-1-16 01:40:29

新人郁闷死了,依样画葫芦都报错,跪求问题出在哪里

按前辈做的一段接标脚本,老是报错,以下是脚本
-------------------------------------------------------
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 and path_bianlithen
                   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
                if n < m then
                   m = n
                   best = v2.no
                end
        end
        return available_quest.no, available_quest.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

karateka 发表于 2021-3-2 03:54:40

你把这段附近代码贴一下一起研究一下

lua: 护镖脚本.lua:240: unexpected symbol near ')'
页: [1]
查看完整版本: 新人郁闷死了,依样画葫芦都报错,跪求问题出在哪里