Replaced obsolete table.getn function with new length operator (#).  Thanks Triode.