Lua advice wanted
Posted: 30 Jun 2021 18:08
Trying to update a plugin to run in FH7 and would welcome some advice.
The plugin used the "table.maxn" function and is now generating an error as that function has been deprecated.
The plugin looked through my FH database seeking a particular fact and if found it copied the 4 elements of the fact to a table.
I used the table.maxn function to determine the table size i.e. if the loop search failed to find any facts then the result would be just the headings I placed in the table at the beginning of the loop.
The plugin runs OK with these few lines commented out and it only use was to report (in the exported text file) if no facts were found.
So, my question is there a alternative and simple way to replicate the table.maxn function?
The plugin used the "table.maxn" function and is now generating an error as that function has been deprecated.
The plugin looked through my FH database seeking a particular fact and if found it copied the 4 elements of the fact to a table.
I used the table.maxn function to determine the table size i.e. if the loop search failed to find any facts then the result would be just the headings I placed in the table at the beginning of the loop.
The plugin runs OK with these few lines commented out and it only use was to report (in the exported text file) if no facts were found.
Code: Select all
if table.maxn(tblFile) < 4 then
table.insert(tblFile, "To Do Facts on record: 0")
end