3
저는 루아에서 간단한 클래스 구현을했습니다.루아 클래스가 작동하지 않습니다.
test = {}
test.__index = test
function test:new()
local o = {}
setmetatable(o, self)
return o
end
function test:setName(name)
self.name = name
print name
end
local name = test:new()
name:setName("hello")
내가 그것을 실행할 때이 오류가 점점 계속 :
루아 : test.lua : 12 : '=' '이름'근처 예상
나는 확실하지 무엇이나 왜 이런 일이 일어나면 어떤 도움을 주시면 감사하겠습니다.
감사합니다. 가장 감사드립니다. – chtombleson