I ran into a small mistake in the help file for the lua function table.insert that I didn't notice before. It says as follows:
"table.insert (t, pos, value)
Inserts the value at (optional) position 'pos', renumbering existing elements if necessary to make room. Thus the new element becomes the one with index 'pos'.
If called with 2 arguments, the value is inserted at n+1, that is, the end of the table."
It should have value and pos switched in either the prototype or the paragraphs. By the name I assume the prototype.
"table.insert (t, pos, value)
Inserts the value at (optional) position 'pos', renumbering existing elements if necessary to make room. Thus the new element becomes the one with index 'pos'.
If called with 2 arguments, the value is inserted at n+1, that is, the end of the table."
It should have value and pos switched in either the prototype or the paragraphs. By the name I assume the prototype.