iDerekLi / juejin-helper

稀土掘金助手:签到、抽奖、沾喜气、消除Bug、海底掘金游戏、自动化工作流。
https://juejin.cn/post/7005379088491741215
Apache License 2.0
253 stars 1.08k forks source link

运行报错 #8

Closed CoderGFWu closed 2 years ago

CoderGFWu commented 2 years ago

TypeError: Cannot read properties of undefined (reading 'length') at SeaGold.getCommands (/home/runner/work/juejin-helper/juejin-helper/scripts/seaGold.js:180:27) at SeaGold.executeGameCommand (/home/runner/work/juejin-helper/juejin-helper/scripts/seaGold.js:150:29) at runOnceGame (/home/runner/work/juejin-helper/juejin-helper/scripts/seaGold.js:348:29) at async run (/home/runner/work/juejin-helper/juejin-helper/scripts/seaGold.js:373:27) 这是啥子错误

iDerekLi commented 2 years ago

没有推算出可用的commands一般是会报这个错误.

CoderGFWu commented 2 years ago

每天都是这样, 要怎么才能解决呢

iDerekLi commented 2 years ago

image 根据你得运行结果上看, 掘金给你分配了一个无法使用上下左右命令绘制的地图导致执行错误. 建议:

  1. 你可以手动玩几局游戏.
  2. 或者尝试修改脚本的开始游戏角色.

2.建议修改方式, 找到 /scripts/seaGold.js 文件.第117行. 由原先:

const gameInfo = await this.gameApi.gameStart();

修改为:

const gameInfo = await this.gameApi.gameStart({ roleId: 1 });
iDerekLi commented 2 years ago

已增加检测0分结算机制, 尝试fetch仓库代码.

CoderGFWu commented 2 years ago

感谢老哥, 尝试手动玩了几把之后似乎没有这个问题了