I have this code here https://makecode.microbit.org/S67355-31276-04851-96966
and it keeps showing 0 on forever before it shows its number and i have no clue how to fix it,
Im using a microbit with the bbc inventors kit and also for some reasons theres a delay between the two micro-bits
this is my assignment, if anyone has any suggests or wanna do it for me thanksss
If there are more than 0 cookies initially, you may want to set the number of cookies at the start.
If you don’t want it to show anything at all until there are cookies added, you could add in another variable to keep track of whether there have ever been cookies and use that to determine if a number should be shown or not. For example, you could name it newCookieJar
and set it to true
initially. You could look at each of your sections of code and consider if each section needs to use or change newCookieJar
in some way.
1 Like