After I saw the demoplatformer I realized how much I liked the multi-file approach to programming. After relentlessly trying to wrap my head around idea I think I've figured it out, except how to use "self."
class "Crab" function Crab:Crab() self.posX = 0 end function Crab:Update(elapsed) self.posX = self.posX + 3 end
This code spits out
attempt to perform arithmetic on field 'posX' (a nil value)
What am I missing?C