Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Intro code cannot work #784

Open
Clemix37 opened this issue Nov 11, 2023 · 3 comments
Open

Intro code cannot work #784

Clemix37 opened this issue Nov 11, 2023 · 3 comments

Comments

@Clemix37
Copy link

Clemix37 commented Nov 11, 2023

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.

@UnPolloLoco
Copy link

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
Copy link

UnPolloLoco commented Nov 21, 2023

This is not fixed yet. Please reopen.

@Clemix37 Clemix37 reopened this Nov 22, 2023
@slmjkdbtl
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants