Hello,
My code is
var grid = this.getNavGrid().grid;
var tileSize = 8;
for(var y = 0; y + tileSize < grid.length; y += tileSize) {
for(var x = 0; x + tileSize < grid[0].length; x += tileSize) {
var occupied = grid[y][x].length > 0;
var occupied_deux = grid[y][x + 5].length > 0; //ERROR WITH + 5
var occupied_trois = grid[y + 5][x].length > 0; //ERROR WITH + 5
if(!occupied && !occupied_deux && !occupied_trois)
{
this.addRect(x + tileSize / 2, y + tileSize / 2, tileSize, tileSize);
this.wait(); // Hover over the timeline to help debug!
}
else if (!occupied)
{
this.addRect(x + tileSize / 2, y + tileSize / 2, 4, 4);
}
The error is : Line 2902: TypeError: tmp57 is undefined
This code worked but now it doesn’t work…
How i’m supposed do an operation ?
Thanck for your futur help. (If my english is not good that’s because i’m not english)