I don't know what's wrong with this code

It's a game that's supposed to return a score when the user touches the ball, but the score is coming back as zero every time. Can someone help me find out why?

I'm very new to programming, so I apologize if the question is stupid. :confused:
Ny_ta_ballen.aia (559.8 KB)

Here are your blocks, by Screen:

Screen1:

Spill:

Creditz:
Creditz

I see three errors:

  • You open Screen1 from another screen, which will eventually fill RAM.
  • You depend on global variables retaining their contents after a screen switch. No. Use TinyDB instead.
  • You have a When Other Screen Closed event in Screen1 (good) but you don't test the name of the other screen that was closed. What score is returned when Creditz closes?
1 Like