Skip to content

error when make digger #2

@x1911

Description

@x1911

You make a awesome lib, thank you very mush first,

I had tried to make small Dungeon for tutorial, but got this error,
image

image

here is my code,

   _generateMap() {
        /*
roomWidth – [min, max] room size
roomHeight – [min, max] room size
corridorLength – [min, max] corridor length
dugPercentage – algorithm stops after this fraction of map area has been dug out; default = 0.2
timeLimit – algorithm stops after this amount of milliseconds has passed
*/
        var digger = new ROT.Map.Digger(this._w, this._h);  


        var digCallback = function (x, y, value) {
            if (value) { return; } /* do not store walls */

            // var key = x + "," + y;
            // this.mapObj[key] = ".";
            this.mapsArray[y][x] = value  // save in a with all walls, for 
        }
        digger.create(digCallback.bind(this));
    }

how can i avoid it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions