Post by irainzer on Nov 14, 2022 12:38:09 GMT
Hello, i need some help with my script..
i cant find solution for this error : string "if(Region(375, 282, 18, 18):exists("tslot1.png",0)) then else..."]:1: 'then' expected near 'Region'
Here my code:
touchList[index] = {target = "spin.png", region = Region(788, 458, 17, 11), id = "spin", action = 'if (Region(375, 282, 18, 18):exists("tslot1.png", 0)) then else click(Location(616, 450)); wait(0.5); if (Region(127, 449, 95, 17):exists("ms1.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms2.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms3.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms4.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms5.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms6.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms7.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms8.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms9.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)); wait(0.5); if (Region(400, 217, 19, 20):exists("ready.png", 0)) then click(Location(37, 68)); wait(1); if (Region(555, 163, 23, 22):exists("nvip1.png", 0)) then if (Region(315, 171, 11, 16):exists("nl5.png", 1)) then Region(107, 206, 125, 121):saveColor("5N001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(314, 169, 13, 19):exists("nvip1.png", 1)) then if (Region(555, 163, 23, 22):exists("nl6.png", 1)) then Region(107, 206, 125, 121):saveColor("6N001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip2.png", 0)) then if (Region(315, 171, 11, 16):exists("nl5.png", 1)) then Region(107, 206, 125, 121):saveColor("5V001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip2.png", 0)) then if (Region(314, 169, 13, 19):exists("nl6.png", 1)) Region(107, 206, 125, 121):saveColor("6V001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip1.png", 0)) then if (Region(314, 169, 13, 19):exists("N4L.png", 1)) Region(107, 206, 125, 121):saveColor("9U001J" .. i .. ".png"); wait(0.5); keyevent(4); end else if (Region(553, 160, 28, 28):exists("nvip3.png", 0)) then Region(107, 206, 125, 121):saveColor("99001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end end end else end else end end end end end end end end end end end'}
i cant find solution for this error : string "if(Region(375, 282, 18, 18):exists("tslot1.png",0)) then else..."]:1: 'then' expected near 'Region'
Here my code:
touchList[index] = {target = "spin.png", region = Region(788, 458, 17, 11), id = "spin", action = 'if (Region(375, 282, 18, 18):exists("tslot1.png", 0)) then else click(Location(616, 450)); wait(0.5); if (Region(127, 449, 95, 17):exists("ms1.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms2.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms3.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)) else if (Region(127, 449, 95, 17):exists("ms4.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms5.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms6.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms7.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms8.png", 0)) then click(Location(750, 444)) else if (Region(127, 449, 95, 17):exists("ms9.png", 0)) then click(Location(811, 23)); wait(0.5); click(Location(718, 23)); wait(0.5); click(Location(333, 293)); wait(0.5); if (Region(400, 217, 19, 20):exists("ready.png", 0)) then click(Location(37, 68)); wait(1); if (Region(555, 163, 23, 22):exists("nvip1.png", 0)) then if (Region(315, 171, 11, 16):exists("nl5.png", 1)) then Region(107, 206, 125, 121):saveColor("5N001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(314, 169, 13, 19):exists("nvip1.png", 1)) then if (Region(555, 163, 23, 22):exists("nl6.png", 1)) then Region(107, 206, 125, 121):saveColor("6N001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip2.png", 0)) then if (Region(315, 171, 11, 16):exists("nl5.png", 1)) then Region(107, 206, 125, 121):saveColor("5V001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip2.png", 0)) then if (Region(314, 169, 13, 19):exists("nl6.png", 1)) Region(107, 206, 125, 121):saveColor("6V001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end else if (Region(554, 162, 25, 25):exists("nvip1.png", 0)) then if (Region(314, 169, 13, 19):exists("N4L.png", 1)) Region(107, 206, 125, 121):saveColor("9U001J" .. i .. ".png"); wait(0.5); keyevent(4); end else if (Region(553, 160, 28, 28):exists("nvip3.png", 0)) then Region(107, 206, 125, 121):saveColor("99001J" .. i .. ".png"); wait(0.5); keyevent(4); wait(0.5) end end end else end else end end end end end end end end end end end'}