我正試圖學習Lua上的繩索,並且正在瀏覽在線教程。我試圖解決的一個問題是檢查表local foo = {}以查看它有多少元素。教程給出了使用local length = table.getn(foo)的建議。當我嘗試使用Lua52時,出現錯誤,提示attempt to call field 'getn' (a nil value)。我環顧四周,並進一步發現任何與table給出的函數產生相同類型的錯
def encrypt(text, key, direction):
if direction == 1: #The direction is either -1, or 1. If it is 1, it goes right. Otherwise, it will go left.
emptys=''
for x in text:
b = ord