CWD Posted July 16, 2009 Report Share Posted July 16, 2009 I've run into a problem where ME is complaining that a Repeat End is not found for a corresponding Repeat Start. I've verified on screen that each Repeat Start has a Repeat End. I've printing out the script and highlighted each start and end. It appears to be correct. Originally I used a Repeat Variable. One thing I noticed was that Repeat End was highlighted green. So, I just changed Repeat Variable to Repeat Start after encountering the error. I still get the error every time the script runs. Could someone help me understand what is going one? The Macro Runs have been tested individually and are working. The problem occurs sometime after the bolded repeat command. I've bolded it here to make it more apparent. // Detects NPCs Macro Run: Set overview NPC Mouse Move Window 1187, 217 Delay 750 Milliseconds Mouse Left Button Click Delay 750 Milliseconds Get Pixel: Under Mouse into %N70% If Variable %N70% > 0 Macro Run: Checks if light on. If yes, turns them off. Macro Run: Window up Macro Run: Deploys items Macro Run: Detect numbers of NPC // Moves mouse to first, then second, third, so on. Variable Set Integer %N73% to 217 Variable Set Integer %N75% to 1 [b] Repeat Start (Repeat 20 times)[/b] Mouse Move Window 1187, %N73% Delay 750 Milliseconds Mouse Left Button Click Delay 750 Milliseconds Mouse Move Window 1314, 117 Delay 750 Milliseconds Mouse Left Button Click Delay 750 Milliseconds Mouse Move Window 1294, 531 Delay 750 Milliseconds Mouse Right Button Click Delay 750 Milliseconds Mouse Move Window 1355, 560 Delay 750 Milliseconds Mouse Left Button Click Delay 750 Milliseconds Mouse Move Window 1187, %N73% Delay 750 Milliseconds Mouse Left Button Click Delay 1 Milliseconds Get Pixel: Under Mouse into %N76% // Waits for first to be destroyed. Repeat Start (Repeat 20 times) If Variable %N76% > 0 Break End If Wait Time Delay 5 Seconds Delay 750 Milliseconds Repeat End End If Delay 750 Milliseconds Variable Modify Integer: %N75% = %N75% + 1 Repeat End Quote Link to comment Share on other sites More sharing options...
rberq Posted July 17, 2009 Report Share Posted July 17, 2009 The inner Repeat Start - Repeat End is OK. The outer (first) Repeat Start is after the main IF, but its Repeat End is after the END IF. So, logically your code may reach the Repeat End without having executed the Repeat Start. I think that is the problem. Quote Link to comment Share on other sites More sharing options...
CWD Posted July 17, 2009 Author Report Share Posted July 17, 2009 The inner Repeat Start - Repeat End is OK.The outer (first) Repeat Start is after the main IF, but its Repeat End is after the END IF. So, logically your code may reach the Repeat End without having executed the Repeat Start. I think that is the problem. That was it. Thanks. I never worked with ME on this level before last week. It was always just recording mouse clicks and movements. Again thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.