Bug with GOTO bottom of loop, (or top of loop)

13 views
Skip to first unread message

Steve Waring

unread,
Aug 8, 2018, 4:00:59 PM8/8/18
to Tasker
A1: For [ Variable:%idxa Items:1:4 ] 
A2: Goto [ Type:End of Loop Number:1 Label: ] If [ %idxa = 2 ]
A3: For [ Variable:%idxb Items:1:2 ] 
A4: End For 
A5: Flash [ Text:%idxa Long:Off ] 
A6: End For 

The Goto at A2 goes to the next bottom of loop (A4), rather than the bottom of the current loop (A6). The same type of problem happens with Goto Top of Loop. I'm guessing it happens with Goto End of If, but I've not checked it.

Seen on Oreo.

Rich D

unread,
Aug 8, 2018, 4:33:33 PM8/8/18
to Tasker Google Groups Post
Sounds like this is 'as expected' behavior. 

From the users guide..

Goto

Go to a different place in the current task.

Number: specify an action number to jump to.

Label: specify an action label to jump to. This is almost always better than specifying a number.

Top of Loop: jump to the first For action above the current action ('continue')

End of Loop: jump to the action after the next End For action ('break')End of If: jump to the next End If action

Steve Waring

unread,
Aug 8, 2018, 6:42:20 PM8/8/18
to Tasker
I see. I'll make a mental note to avoid this option, and use Goto label instead. Even when used in a For loop with no nested For loops, I'd only have to add a For loop in the future and the wrong actions would start happening.

Noel Yap

unread,
Aug 8, 2018, 6:58:07 PM8/8/18
to tas...@googlegroups.com
Yeah, I pretty much stick to using "Goto label" since it's the least brittle to maintenance.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages