Code deleting randomly

When I delete a certain block, a chunk of the on start section just disappears, too.
I can always undo, but it is still mildy infuriating every time this happens. :expressionless_face:

4 Likes

This happens to me too. I delete an unneeded block, test my code and find out that the code to create the player is gone. @richard (Sorry for pinging you) do you know anything about this?

4 Likes

i need more detail than what you’re giving me to diagnose this. any chance you can record a video of this happening? or do you have a share link to a project where this happens and steps to reproduce the issue?

3 Likes

@richard I have a screen recording, but I can’t upload it

1 Like

I have an open On start with a lot of code in it. then, I’m toggling another thing, most probably On game update. The On start is all the way off screen. I delete something while holding Ctrl. Suddenly, the screen clips a little. When I go back, half my code on start is poof

2 Likes

I have the same error! I don’t know exactly how it happened, but I did take a screenshot of what it did

It deleted ALL of the variables (hover was created AFTER it happened)
as well as all of the player types.

heres the link to the project (I did nothing to it as of writing this)

4 Likes

Here’s another demonstration of how this happens. Hope this helps.

5 Likes

this happened to me too it also made a new variable named i and then when i reloaded everthing was normal except all of the variables i messed with got turned into variables

2 Likes

@naily next time that happens, please open up the developer tools and try to see what is in the console

to get what’s in the console

  1. open the browser developer tools by either:
    a. right clicking on the page somewhere (not the blockly workspace) and choosing “inspect”
    b. pressing the F12 key
    c. pressing “ctrl + shift + i” on windows
  2. switch to the console tab in the view that appears
  3. send me a screenshot of everything in there
4 Likes

i wrote up some more detailed instructions on how to copy the browser console and other things to do when reporting a bug:

4 Likes

something that happened to me was I just added a new colour palette and committed on github only to find everything was gone. Got it back but it scared me.

2 Likes

It happened again!


Removed the formatting I had for a text sprite.

3 Likes

thanks @naily! I was able to quickly figure out the problem thanks to your logs:

3 Likes

i’ve also had this problem





4 Likes

because of some chromebook thing, I can’t access the console log, but I can describe what keeps happening. It’s like @naily’s bug but it also affects spritekinds. The most annoying thing is that this happens like every 10 minutes. :sob: if this keeps happening, it will effectively make me destroy me computer, quit Makecode, and never finish my game jam game.

1 Like

I am not going to lie this happened again 30 seconds after me writing this post.

1 Like


this seems to happen to only some projects randomly, and it happens to most when you have custom spritekinds. It’s where every one of your variables disappear and your custom spritekinds also disappear. This used to happen constantly and seems to be happening for my coder king 5 project.

2 Likes

I keep getting the sprite kind deletion bug, as well as tile deletion bug, both being incredibly frustrating. Just for reference, the tile deletion bug just makes every set tile to () block go blank. I also had a really weird one this morning when it changed some to the blank blocks, and some to these white half blocks? As in, triangle white slopes that I didn’t have in the assets.

1 Like