This loop is making me sick... HELP :P

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

yocal
a lesser mummy
a lesser mummy
Posts: 43
Joined: Fri Jun 14, 2002 12:28 pm
Location: Denmark
Contact:

This loop is making me sick... HELP :P

Post by yocal » Thu Aug 15, 2002 11:48 am

Here goes the Loop:

Code: Select all

Sub Combine 
 
   /varset v50 0  
 
   /click left pack v80 combine  
 
   :CombineLoop 
 
       /doevents 
        
       /if n $v50==0 /goto :CombineLoop 
       /if n $v50==1 /return
       /if n $v50==2 {	:DropLoop 
 			   /click left auto 
 			   /if "$cursor()"!="NULL" /goto :DropLoop 
		     }
 
/return
And this is the events:

Code: Select all

Sub Event_CombineFail

   /varset v50 1

/return


Sub Event_CombineSuceed 

   /varset v50 2

/return
The problem is that the loop stops/freeze... But i cant see why it does...? If i put in a delay like:

Code: Select all

/if n $v50==2 {	:DropLoop 
 			   /delay 5 
 			   /click left auto 
 			   /if "$cursor()"!="NULL" /goto :DropLoop 
		     }
...it works fine... Help! :(

// Yoc.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Thu Aug 15, 2002 11:51 am

Salutations,
um... the line with the { and the label on it? doesn't the label have to be on a new line? dunno if thats yer problem but...

yocal
a lesser mummy
a lesser mummy
Posts: 43
Joined: Fri Jun 14, 2002 12:28 pm
Location: Denmark
Contact:

Post by yocal » Thu Aug 15, 2002 11:52 am

... you just wrote that to get the last post on every board :P

// Yoc.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Thu Aug 15, 2002 11:55 am

Salutations,
no... that was a serious question/solution/whatever...