vendredi 6 octobre 2017

Issue with page on different pc

Using the same web browser in 2 different computer (Firefox) i have two different behave of my code. In one it's working fine, in the other i have my game which is represented with a canvas not shown properly, just a BLACK rectangle. I also receive an errore into the Firefox console SyntaxError: missing ; before statement file.js:12:8 which seems a banal error.

function arenaSweep() {


let rowCount = 1;     //this is line 12 
outer: for (let y = arena.length-1 ; y > 0; --y) {
    for (let x = 0; x < arena[y].length; ++x) {
        if (arena[y][x] === 0) {
            continue outer;
        }
    }

    const row = arena.splice(y, 1)[0].fill(0);
    arena.unshift(row);
    ++y;

    player.score += rowCount * 10;
    rowCount *= 2;
}}

i've some issue to locate the problem. First i have two different behaviour with same browser, second it's an error which i think is not an error. Of course i'm missing something, can you help me with that?




Aucun commentaire:

Enregistrer un commentaire