Loop referencing again [closed]

I keep getting the same error message and it is not letting me save my script once written.
Unexpected loop error!

Trying to add a simple “Double Click” to edit table on an elearning module and produce a pdf report of the information captured.

snip of code