|
Post by tr1b4l on Mar 28, 2019 20:14:33 GMT
This script gives me an error about an unexpected symbol near '}', any help would be appreciated
----- created by AnkuLua snap and play script ------
immersive = true
setImmersiveMode(immersive)
genVersion = "8.3.0-trial"
setAutoGameArea = true
pcall (autoGameArea, setAutoGameArea)
scriptDimension = 1440
Settings:setScriptDimension(true, scriptDimension)
Settings:setCompareDimension(true, scriptDimension)
local index = 1
touchList = {}
waitList = {}
setManualTouchParameter(300, 1)
p1 = Location(1440, 1550)
p2 = Location(0, 1550)
p3 = Location(1440, 1450)
p4 = Location(0, 1450)
p5 = Location(720, 1500)
actionList = { {action = "touchdown", target = p5},
{action = "touchMove", target = p1},
{action = "touchMove", target = p2},
{action = "touchMove", target = p3},
{action = "touchMove", target = p4},
{action = "touchMove", target = p5},
{action = "touchUp", target = p5} }
------Enter Stage------
touchList[index] = {target = "lvl7.png", region = Region(742, 744, 200, 200), id = "lvl7", action = 'click'}
index = index + 1
touchList[index] = {target = "play.png", region = Region(623, 2743, 200, 200), id = "play", action = 'click'}
waitlist = 6.5}
index = index + 1
------Move------
while (true) do
for i = 1 , 100 do
manualTouch(actionList)
end
end
index = index + 1
------Return to Map------
touchList[index] = {target = "exit.png", region = Region(29, 2746, 200, 200), id = "exit", action = 'click'}
index = index + 1
|
|
|
Post by Exilereven on Mar 28, 2019 22:04:29 GMT
Post entire script, and screenshot of the actual error and line its on. We can fix it.
|
|
|
Post by Mercobots on Mar 28, 2019 23:05:25 GMT
maybe this line here
waitlist = 6.5}
try to remove }
waitlist = 6.5
|
|
|
Post by tr1b4l on Apr 8, 2019 23:28:28 GMT
thanks for the help, figured it out for Record and play but would like help for making some series of swipe actions between search and click for snap and play, so far i have:
----- created by AnkuLua snap and play script ------ immersive = true setImmersiveMode(immersive) genVersion = "8.3.0-trial" setAutoGameArea = true pcall (autoGameArea, setAutoGameArea) scriptDimension = 1440 Settings:setScriptDimension(true, scriptDimension) Settings:setCompareDimension(true, scriptDimension) local index = 1 touchList = {} waitList = {}
------ 1 ----- touchList[index] = {target = "accept.png", region = Region(646, 1646, 720, 720), id = "accept", action = 'click'} waitList[index] = .002 index = index + 1
------ 2 ----- touchList[index] = {target = "play.png", region = Region(358, 2500, 720, 720), id = "play", action = 'click'} waitList[index] = .002 index = index + 1
------ 3 ----- touchList[index] = {"swipe", Location(1435, 1500), Location(5, 1500)} waitList[index] = .002 index = index + 1
------ 4 ----- touchList[index] = {"swipe", Location(1435, 1500), Location(5, 1500)} waitList[index] = .002 index = index + 1
------ 5 ----- touchList[index] = {"swipe", Location(5, 1500), Location(1435, 1500)} waitList[index] = .002 index = index + 1
------ 6 ----- touchList[index] = {"swipe", Location(5, 1500), Location(1435, 1500)} waitList[index] = .002 index = index + 1
but i get error
"Runtime error:/sdcard/Ankulua/snapandplay/snapandplay.lua:1093 attempt to concatenate field 'id'(a nil value) stack traceback:/sdcard/Ankulua/snapandplay/snapandplay.lua:1093:in function 'playback'/sdcard/Ankulua/snapandplay/snapandplay.lua:1241: in main chunk"
note i need to repeat index 3 to 6 50 times
|
|