Lua错误:尝试比较函数和数字中的__lt。

我在 Lua 中尝试通过上述代码比较值:

if (self.areaTextoVisible:measureText(linhas[linhaIndice] .. " " .. w) < (self.areaTextoVisibleWidth - (offSetScroll + self.margemLateral + (self.margens * 2)))) then
linhas[linhaIndice] = linhas[linhaIndice] .. " " .. w;

但是我遇到了“尝试在函数和数字上比较 __lt”的问题。我该如何解决这个问题?

点赞