北大侠客行MUD论坛

 找回密码
 注册
搜索
热搜: 新手 wiki 升级
查看: 2114|回复: 1

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

[复制链接]
发表于 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[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
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
发表于 2021-3-2 03:54:40 | 显示全部楼层
你把这段附近代码贴一下一起研究一下

lua: 护镖脚本.lua:240: unexpected symbol near ')'
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|北大侠客行MUD ( 京ICP备16065414号-1 )

GMT+8, 2024-3-29 06:04 PM , Processed in 0.009144 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表