Hello
,
I am having some stressful news, you know the set mySprite of kind player block?
Well, my variables and the kind of the player keep erasing! I always have to add them again.
Does anyone have the same issue, and is there a way to fix it?
Thanks, Taison.
1 Like
I have been having the same issue. I don’t know how to fix it, but try deleting all of your duplicate assets and making sure they all have names (I read that might help the problem).
nah me too, its a makecode bug. frequently save and go to version history as I think that works, I have a with more info
2 Likes
I may have found a solution, but I can’t get the problem to happen again to test my theory.
- Save your project
- convert it to javascript
- copy the part at the top that looks like this:
code
namespace SpriteKind {
export const display = SpriteKind.create()
export const koopaGreen = SpriteKind.create()
export const offScreenKoopaGreen = SpriteKind.create()
export const OffScreenEnemy = SpriteKind.create()
…
}
- hold on to that code (paste it in a comment?) so that you can copy it when you need
- put your project back into blocks
- when the error occurs, go into javascript and paste the code we copied at the top
This should work in theory, because it is replacing the code that is being deleted. I will let you know if it works for me.
1 Like
Just got the problem: pasting the code in javascript and switching back to blocks worked for me. Just make sure to save your project first in case it doesn’t work for some reason.
Just in case you need to take a look at my code, here is the link:
P.S. I recommend that if you ever take a look at my code, zoom out
Their is more hidden and scattered across my project