Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

326
Vistas
Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Not sure what to do

I am trying to make a 2.5D game inspired by Drew Conley from youtube but whenever I try to include this JS file this problem shows up and I cant figure out what it means. any help would be appriciated Picture in Link Code Error from Console

class NPC extends GameObject{
    constructor(config){
        super(config);
        this.movingProgressRemaining = 32;

        this.directionUpdate = {
            "up:": ["y", -1],
            "down:": ["y", 1],
            "left:": ["x", -1],
            "right:": ["x", 1],
        }
    }

    update(state) {
        this.updateposition();
    }




    updateposition(){
        if (this.movingProgressRemaining > 0){
            const[property, change] = this.directionUpdate[this.direction];
            this[property] += change;
            this.movingProgressRemaining -= 1;

        }
    }

}

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Thanks to Barmar the problem was i had written a : in my directionUpdates

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda