这应该可以工作 function getEntryFromEnd(table, entry) local count = (table and #table or false) if (count) then return table[count-entry]; end return false; end