- Joined
- Jun 26, 2020
- Messages
- 1,921
Hello, I'm again trying to translate the Codeless Save Load System to Lua, but for some reason I'm not receiving the method of the metatable when I'm calling it, this is weird because I though if a table doesn't have a field, it will check to its metatable, basically I did this:
And I did this:
it prints me
It prints me the function, what is happening?
Lua:
---@return Savecode
function Savecode.create()
local sc = setmetatable({}, Savecode)
sc.digits = 0.
sc.bigNum = BigNum.create(BASE())
return sc
end
Lua:
local savecode = Savecode.create()
print(savecode.Encode)
nil
, but if I do this:
Lua:
local savecode = Savecode.create()
print(getmetatable(savecode).Encode)