Implementing Simple Counting using Custom Locks

#checkCounter
lockcheck=2,L4 err=count5
lockcheck=2,L3 err=count4
lockcheck=2,L2 err=count3
lockcheck=2,L1 err=count2
do=count1
exit
 
:clearCounter
lock=0,L1
lock=0,L2
lock=0,L3
lock=0,L4
back
 
:count1
echo="First call!" 
lock=1,L1
exit
 
:count2
echo="Second call!" 
lock=1,L2
exit
 
:count3
echo="Third call!" 
lock=1,L3
exit
 
:count4
echo="Fourth call!" 
lock=1,L4
exit
 
:count5
echo="Fifth call - starting over!" 
do=clearCounter
exit

(Note: L1-L4 above are custom made up names that can be changed freely!)

Attention

Always double check that you are using the right syntax/alert!