Wrong Code - Forest - Level 2. Click Bait

So I’ve reached to the Forest section, at Level 2. Called Click Bait.

However, I’m trying to continue, but it isn’t letting me. It says the code is wrong, I haven’t changed anything. This is what it says “FIX YOUR CODE - Line 5: Type Error: this.setGoal is not a function.” I’ve tried deleting line 5, however it still says that on all lines.

Kind Regards

I am getting this error in Game Development 1 level 2; called Click Bait. I am using javascript and my error is: Line 5: TypeError: Object doesn’t support property or method ‘setGoal’.

The code for the level is:

  1. // Don’t change any code. Just click PLAY!
  2. // Move to all the red X marks to win.
  3. game.spawnHeroXY(5, 8);
  4. game.addMoveGoalXY(10, 18);
  5. game.addMoveGoalXY(10, 38);
  6. game.addMoveGoalXY(48, 41);

Thanks for the reports! This should be fixed now. If it’s still not working, try clearing your browser cache.

I have a problem with the code on Lua

I think when the level start im getting the code as JAVA as below

// Don’t change any code. Just click PLAY!
// Move to all the red X marks to win.

game.spawnHeroXY(5, 8);
game.addMoveGoalXY(10, 18);
game.addMoveGoalXY(10, 38);
game.addMoveGoalXY(48, 41);

when I try to change the code to Lua as such

game:spawnHeroXY(5, 8)
game:addMoveGoalXY(10, 18)
game:addMoveGoalXY(10, 38)
game:addMoveGoalXY(48, 41)

The character is not moving after click, I am getting a script is running slow or infinite loop error

any help would be appreciated, thanks

I think the level was made to be written in Javascript XD it seems to be the same for all game development stages

hello,
i have the same problem here i cant move my knight when i click
i have tried to clear my browser cache but that did not work
i am using the python version.

any help would be appreciated, thanks

greetings rope

@Catsync is the bug back? I just reloaded the code and got an error as well.

Different bug, after we made the wolf pet non-attackable :). It should be fixed now! If you’re still seeing it, try reloading your cache!

2 Likes

interesting, it works now.