Acces function from constructor in Lua
snippet in lua

Acces function from constructor in Lua

user9848

function SurpriseBox.new()  -- constructor
  local object = setmetatable( {boxes = {}}, SurpriseBox_mt )
  object:CreateBoxes()
  print('constructor -> ' .. #object.boxes)
end