求大神修改一下lua脚本语句

EnablePrimaryMouseButtonEvents(true)
math.randomseed(tostring(os.time()):reverse():sub(1, 6))
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
while (true)
do
if (IsMouseButtonPressed(1)) then
ReleaseMouseButton(1)
MoveMouseRelative(0,math.random(9,14))
PressMouseButton(1)
Sleep(30)
else
break
end
end
end
end

调试的时候显示
input:1: attempt to call a nil value (global 'EnablePrimaryMouseButtonEvents')

第1个回答  2018-02-12
EnablePrimaryMouseButtonEvents
提示是说你没有定义这个变量, 看你的代码这应该是个函数, 脚本多半不完整本回答被网友采纳
第2个回答  2018-02-07
整个文件传上来,看看追问

就只有这么几行代码,是个小脚本

追答

把你能提供的所有代码传上来
如果没有,把那行前面加//看还报错么?有错误接着问

相似回答