I'm trying to create Ball class and have some methods in the class but I can't find the right syntax
Tried reading this: https://www.lua.org/pil/16.html
MovingObj = {}
function MovingObj:new(o)
return o
end
ball = MovingObj:new {}
MovingObj.test = function (self)
print ("Test!")
end
ball:test()
Error message I get: attempt to call method 'test' (a nil value)