lua报错 怎么解决 谢大神

源代码
init("0",0)
luaExitlfCall(true)
while true do
mSleep(2100)
touchDown(9,312,209)
mSlleep(130)
touchUp(9,312,209)
mSleep(2500)
touchDown(6,62,909)
mSleep(130)
touchUp(6,62,909)
mSleep(2500)
touchDown(6,95,882)
mSleep(130)
touchUp(6,95,882)
mSleep(2500)
for deg = 100, 1, -1 do
x,y = findColorInRegionFuzzy(0xefc700, deg, 644, 476, 810, 476);
if x ~= -1 and y ~= -1 then
touchDown(9,155,766);
touchUp(9,155,766);
break;
end
end
end

错误:
c:\users\admin\desktop\luaeditor.lua:1: attempt to call global 'init' (a nil value)
Stack Traceback:
c:\users\admin\desktop\luaeditor.lua:1: in main chunk

错误提示已经写的很明白了 你的init这个函数没有实现

function init(xxx)
  xxxx
end

补上你缺的这个函数 然后实现对应的功能

或者 require你所需要的lua文件

温馨提示:答案为网友推荐,仅供参考
相似回答