Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants