Hey,
thanks again for all your help with Lua!
Trying to do some OOP again. Got a warning in VS Code after following your tutorial. I think it's because of a small error:
Here, I think the ---@type is supposed to be a ---@class.
thanks again for all your help with Lua!
Trying to do some OOP again. Got a warning in VS Code after following your tutorial. I think it's because of a small error:
Lua:
function AnimalRace.create(name, baseUnittypeId)
local new = {} ---@type AnimalRace (new objects are basically always empty tables)
setmetatable(new, mt) --the most important part. Allows objects to fetch default values from the class.