When #table_namedoes the value return not 0? And again, when table.getn(table_name)returns a non-0 value?
#table_name
table.getn(table_name)
Go through the manual:
2.5.5 - Length OperatorThe length operator is denoted by the unary operator #. String length is the number of bytes (which is the usual value for string length when each character is one byte).t n , t [n] nil t [n + 1] nil; , t [1] nil, n . -nil 1 n, n, . "" ( nil -nil ), #t , nil ( nil, ).
2.5.5 - Length Operator
The length operator is denoted by the unary operator #. String length is the number of bytes (which is the usual value for string length when each character is one byte).
t n , t [n] nil t [n + 1] nil; , t [1] nil, n . -nil 1 n, n, . "" ( nil -nil ), #t , nil ( nil, ).
(, ), 0.