kaboom icon indicating copy to clipboard operation
kaboom copied to clipboard

Intro code cannot work

Open Clemix37 opened this issue 2 years ago • 3 comments

Hello,

I was reading again the intro on the webiste but i found out that the full game code (can be found here) cannot work because of the score variable that is not scope of the lose scene ... Score is declared inside the game scene, but we try to get it in the lose scene which cannot work.

Clemix37 avatar Nov 11 '23 22:11 Clemix37

More specifically, putting the score variable into the scene is never explained, but instead just put into the full code example at the bottom of the page;

This line isn't explained: scene("lose", (score) => {

UnPolloLoco avatar Nov 14 '23 19:11 UnPolloLoco

This is not fixed yet. Please reopen.

UnPolloLoco avatar Nov 21 '23 16:11 UnPolloLoco

The full code below does work, but yeah it's not explaining we're passing score through go("lose", score) and the lose scene gets it from the function argument. I'll add explanation soon.

slmjkdbtl avatar Nov 22 '23 10:11 slmjkdbtl