Create callback using for loop

that is because you need to define a function.

This thread should be helpful with your issue.

2 Likes