Class "is not a function"
MAking a game with a class as the player
PlayerClass = class
constructor = function(x,y)
this.x = x
this.y = y
this.spawnX = x
this.spawnY = y
this.speedX = 0
this.speedY = 0
this.width = 20
this.height = 20
this.gravity = -0.5
this.jumpHeight = 6
this.acceleration = 1
this.friction = 0.8
end
draw = function()
Obj.draw.poly(this.x,this.y,this.width,this.height,"#FFF")
end
end
init = function()
player = PlayerClass(0,40)
end
It gives the error