Using 'Object' functions in Lua?
I want to be able to have 'objects' with certain functions that refer to
themselves (I have no idea what to call this) in Lua. I have seen code of
what i'm trying to do but i have never understood what any of it actually
means. I have tried looking over the Lua website but no luck.
Basic Code:
table = {}
function newTable(...)
...
return setmetatable(table)
end
function table:function(...)
...
end
Can someone explain what is going on here and how i can use this please?
Thanks for reading!
No comments:
Post a Comment