dzp
dzp
The problem should be caused by these two codes: https://github.com/scandum/tintin/blob/84ca426c77b31f53539f09b409562fcde4e6d2b2/src/net.c#L674 https://github.com/scandum/tintin/blob/84ca426c77b31f53539f09b409562fcde4e6d2b2/src/net.c#L701
I looked at the source code, and unlike `{foo|bar}` which would be compiled to `^(foo|bar)$`, it seems that `%!{foo|bar}` is compiled to `^foo|bar$` instead of what I thought was `^(?:foo|bar)$`,...
I just tested it and it's fine now. Thank you!
第三条目前是有的。只是缺乏文档。回头我在整理文档时一并说明。目前可以参考这里: https://github.com/mudclient/go-mud/blob/master/lua-api/lua.go#L196-L215 另外两条需要评估,其中第二条暂时无法实现,可能要等到 GoMUD 有了内置的脚本语言之后才能够提供接口。目前可以假定为 80x25 或你的实际终端尺寸。 第一条按照我的设想,应当遵循 Unix 规范。也就是说不必将 lua 脚本与 go-mud 可执行文件放在一起,而是在你的脚本所在目录启动 go-mud(推荐将 go-mud 所在目录加入 $PATH 环境变量)。这个道理正如我们不需要把自己的项目代码放到 go/gcc/vc 的安装目录一样。
你直接在你的脚本中获取 cwd(当前工作目录)就可以了,不必询问 GoMUD。GoMUD 只存在于 $PATH 中,保证可用就可以了。
我知道了。这个只是显示问题,实际上并没有报错。这里是企图把错误信息显示出来,但没有错误信息的时候就会显示这个。以后会改正。
应该已经解决了。你可以验证一下。 @zhenzh
已经支持部分 lua 机器。 参见 https://github.com/dzpao/lua-mud-robots 。 支持的机器列表: * gps * p2p