Closed Mynogs closed 2 years ago
Well, probably because # is (some kind of) a function call. After all, it's some alternative of table.getn(). Just guessing: maybe that alias is not properly resolved in this case?
My guess that # and / or ... led to the problem was wrong. The problem always occurs in the meta function index. If an error occurs there, this error message always appears with this large line number. So far I could not find the error in the index function. In the index function another function (_io) is called. The problem only appears when _io is called via index. Not if the call is direct. With Zerobrane Studio (Lua 5.3) the problem never occurs. Since I made in _io all further calls via pcall the problem disappeared.
I found an intersting bug (?):
Give this error message (see the silly line number):
This works fine:
This happens also for getting the length of a string with # I see this only on Lua RTOS. With ZeroBrane Studio it works.
Is %d not usable with #?