Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在下面的代码中添加“更多文本”时,我尝试调用字段“defaultName”(一个字符串值) :
-- alert = native.showAlert( "saved!", "Your score is saved to " ..defaultName " some more text " ..allScore_txt , { "Done" }, onComplete ) --
知道如何解决这个问题吗?
你错过了一个..之后defaultName,所以 Lua 认为你的意思是一个函数调用,因此错误消息。Lua 允许identifier"string"以 identifier("string")` 的简写形式调用函数。
..
defaultName
identifier"string"