找回密码
 register

QQ登录

只需一步,快速开始

查看: 72|回复: 0

天龙客户端报错 too many captures 解决思路

[复制链接]

天龙客户端报错 too many captures 解决思路

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:94
  • 打卡月天数:17
  • 打卡总奖励:94
  • 最近打卡:2025-01-18 01:28:20
Waylee

主题

0

回帖

1万

积分

仙帝

积分
12364
Waylee 2023-2-4 20:11 | 显示全部楼层 |阅读模式

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×
文章编辑人员:雪舞
内容测试时间:2023-2-4 20:09:37
测试环境:LUA天龙
测试版本:仿官 彻底符

客户端报错提示:
too many captures


例如:
        pos1,pos2,DunJiaShu_PosZ[1],DunJiaShu_PosX[1],DunJiaShu_PosZ[2],DunJiaShu_PosX[2],DunJiaShu_PosZ[3],DunJiaShu_PosX[3],DunJiaShu_PosZ[4],DunJiaShu_PosX[4],DunJiaShu_PosZ[5],DunJiaShu_PosX[5],DunJiaShu_PosZ[6],DunJiaShu_PosX[6],DunJiaShu_PosZ[7],DunJiaShu_PosX[7],DunJiaShu_PosZ[8],DunJiaShu_PosX[8],DunJiaShu_PosZ[9],DunJiaShu_PosX[9],DunJiaShu_PosZ[10],DunJiaShu_PosX[10],DunJiaShu_PosZ[11],DunJiaShu_PosX[11],DunJiaShu_PosZ[12],DunJiaShu_PosX[12] = string.find(g_mydinghunstring,string.rep("(%d%d%d)",24))


24个变量是不会报错的,当超过32个的时候就会爆这个错误。解决方法将他拆分多段

引用一个帖子的内容:
https://stackoverflow.com/questi ... captures-how-fix-it

I think the error is self-explanatory: you have too many captures in your pattern (those groups that are wrapped into parentheses). The default value is 32. You have a couple of options: (1) recompile your Lua version to use a large number (you'll have to modify LUA_MAXCAPTURES value), but keep in mind that this limit is there for a reason and (2) change your pattern to avoid this many captures (possibly splitting into smaller fragments/patterns). You may also consider using more powerful parsers, like LPEG.

您需要登录后才可以回帖 登录 | register

本版积分规则

雪舞知识库 | 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 |天天打卡

GMT+8, 2025-1-19 20:22 , Processed in 0.095766 second(s), 8 queries , Redis On.

Powered by XueWu Licensed

Copyright © Tencent Cloud.

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