Ask coding questions

← Back to all posts
What is the problem?
ichbindede

Problem

  • I'm making a rpg game in kaboom an here's the problem:
    SyntaxError: Unexpected token '{'
    at /:242:52
Voters
ichbindede
Comments
hotnewtop
ch1ck3n

i've edited your program a little so it works now
https://replit.com/@ch1ck3n/rpg-game#index.html

ichbindede

when i fork it's still don't work. What did you change? @ch1ck3n

ch1ck3n

@ichbindede

works for me

ch1ck3n

@ichbindede i changed this part

ichbindede

i changed the codes like this:
player.overlaps("shop", () => {
if (hasGold) {
talk("you bought the key of passing this level")
hasKey2 = true;
}
}
else {
talk("you got no key!");
}
});

but now it gives this error:
SyntaxError: missing ) after argument list
at /:245:3
@ch1ck3n

ichbindede

when i run your repl yes it works but when i fork your repl iit doesn' works @ch1ck3n