What does the "invalid capture index" error mean

What does the “invalid capture index” error mean and points to the string local beginfnvariables, endfnvariables = string.find(tbl[j], tbl[i])

Are you using patterns or just strings?

If patterns then they need to be properly formatted. If string then your tbl might have a character that Lua is interpreting as doing a group capture, such as a %. Any special characters in your string should be escaped wherever necessary.

Printing out the j and i values in your loop should get you near where the culprit is.

1 Like

Thank You!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.