Hello,
I created and array here :
(function() {var layers = [];Next I use it like this :
Spriteset_Map.prototype.createLayers = function() {var layer = this.layers.push(new Sprite());
And finally, the problem appear here :
Spriteset_Map.prototype.updateLayers = function() { var lel = this.layers.length;};I got : Cannot read property 'length' of undefined
What is happening ? And how to solve it ?
Thanks for help !
I created and array here :
(function() {var layers = [];Next I use it like this :
Spriteset_Map.prototype.createLayers = function() {var layer = this.layers.push(new Sprite());
And finally, the problem appear here :
Spriteset_Map.prototype.updateLayers = function() { var lel = this.layers.length;};I got : Cannot read property 'length' of undefined
What is happening ? And how to solve it ?
Thanks for help !