龙大蚂蚁森林脚本运行出错,求大神帮忙解决一下。

脚本地址:https://github.com/e1399579/autojs/blob/master/蚂蚁森林设置向导.js
运行日志如下:
10:43:50.383/E: ReferenceError: "activity" is not defined.
at file:///android_asset/modules/ui.js:15:0
at showSettings (/storage/emulated/0/脚本/蚂蚁森林设置向导.js:23:0)
at /storage/emulated/0/脚本/蚂蚁森林设置向导.js:106:0


org.mozilla.javascript.EcmaError: ReferenceError: "activity" is not defined. (file:///android_asset/modules/ui.js#15)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4142)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4120)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:4210)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1952)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1891)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1558)
at script(file:///android_asset/modules/ui.js:15)
at script.showSettings(/storage/emulated/0/脚本/蚂蚁森林设置向导.js:23)
at script(/storage/emulated/0/脚本/蚂蚁森林设置向导.js:106)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:399)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3452)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1275)
at com.stardust.autojs.engine.RhinoJavaScriptEngine.doExecution(RhinoJavaScriptEngine.java:78)
at com.stardust.autojs.engine.JavaScriptEngine.execute(JavaScriptEngine.java:22)
at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.access$001(LoopBasedJavaScriptEngine.java:18)
at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.lambda$execute$0$LoopBasedJavaScriptEngine(LoopBasedJavaScriptEngine.java:43)
at com.stardust.autojs.engine.LoopBasedJavaScriptEngine$$Lambda$0.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.execute(LoopBasedJavaScriptEngine.java:59)
at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.execute(LoopBasedJavaScriptEngine.java:35)
at com.stardust.autojs.execution.LoopedBasedJavaScriptExecution.doExecution(LoopedBasedJavaScriptExecution.java:42)
at com.stardust.autojs.execution.RunnableScriptExecution.execute(RunnableScriptExecution.java:41)
at com.stardust.autojs.execution.RunnableScriptExecution.execute(RunnableScriptExecution.java:35)
at com.stardust.autojs.execution.RunnableScriptExecution.run(RunnableScriptExecution.java:29)
at java.lang.Thread.run(Thread.java:760)

@zz0770 有一个模块没读到啊,没有调用到activity。或运行环境不一样

最后由 lailer132 编辑

第一行必须是。
"ui";
一个空格都不能多。
一个字符都不能少。

@zz0770 你为啥不进群问他……

  • 4
    帖子
  • 2055
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待