Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
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 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!