After Logitech API got updated for the 5.4 Lua version, table.getn got deprected and some guys that helped me said I could update the code with
table.getn