Learn Intermediate OOP by Building a Platformer Game - Step 117

Hello I am quiet stuck in the last lesson i tried to reset the lesson and did again but i get the same error msg

/* file: script.js */
// User Editable Region


      if (index === checkpoints.length - 1) {
        isCheckpointCollisionDetectionActive = false;
        showCheckpointScreen("You reached the final checkpoint!");
        movePlayer("ArrowRight", 0, false);
      }else if(player.position.x >= checkpoint.position.x &&
               player.position.x <= checkpoint.position.x+40){
        showCheckpointScreen("You reached a checkpoint!")
      }


// User Editable Region

does someone have a tip for me?

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 117

The last thing in this condition is the problem, its just a matter of spacing. Good luck

1 Like

No way! :sweat_smile: I never would have thought of this. Doesnt is normally matter?

Hi there!
Every value, operators, and calculation should be separate always.