deanhystad gave the answer. You need to be able to reference the labels in the list. All I did was append the labels into a list and used it in the function.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags