Discuss Scratch

Weronika_45
Scratcher
40 posts

How do you fix glitches and what are they?

Right, so everybody is saying the word glitches. But what actually are they and how do you fix them? Please help.
when green flag clicked
ask [What are glitches and how do you fix them?] and wait
Zelfen
Scratcher
1000+ posts

How do you fix glitches and what are they?

A glitch is basicly something that's not meant to happen. To fix them, you need to go in the code and use your brain and shuffle blocks around
Weronika_45
Scratcher
40 posts

How do you fix glitches and what are they?

Ok, thanks!!!!
-ShadowOfTheFuture-
Scratcher
1000+ posts

How do you fix glitches and what are they?

To fix a glitch, look through your scripts and try to figure out what's causing the glitch to happen, then using that knowledge try to rework your code to prevent it from happening. See if you've made any logical errors or even accidentally placed the wrong block somewhere, the latter one especially can happen pretty often.

If you're using variables, one thing I find helpful is to show every variable on-screen and see if any of them are behaving weirdly. For example, if you have a variable with a ridiculously high value or one that's rapidly increasing beyond what it should be, you know there's probably some bugged code that has to do with it.

Last edited by -ShadowOfTheFuture- (July 27, 2020 19:50:03)

Cutie_Pooge
Scratcher
500+ posts

How do you fix glitches and what are they?

-ShadowOfTheFuture- wrote:

To fix a glitch, look through your scripts and try to figure out what's causing the glitch to happen, then using that knowledge try to rework your code to prevent it from happening. See if you've made any logical errors or even accidentally placed the wrong block somewhere, the latter one especially can happen pretty often.

If you're using variables, one thing I find helpful is to show every variable on-screen and see if any of them are behaving weirdly. For example, if you have a variable with a ridiculously high value or one that's rapidly increasing beyond what it should be, you know there's probably some bugged code that has to do with it.
From my experience, most of the time it's just scratch being annoying and you need to create workarounds to things, for example, a variable increases 30 times a second but when you remove a motion block it starts increasing 500 times a second since scratch tries to iterate it fast. I suggest adding some motion blocks to fix this like
change x by (0)
Some other glitches include:
sprite appearing at the side of screen, you can fix by changing
(size)
sprite not going to the correct size, you can fix by
switch costume to [blank v] //you would need to create a blank costume
or you would need to click the green flag twice, that's because you used too many
when green flag clicked
and there are plenty of common glitches, I rarely see a wrong block being the reason

Last edited by Cutie_Pooge (July 28, 2020 02:31:16)

Jeffalo
Scratcher
1000+ posts

How do you fix glitches and what are they?

usually when i have glitches (sometimes referred to as bugs) I'll just pretend they are features

but this probably isn't the best approach. if something isn't working as it should then you'll need to check your blocks and make sure that you understand exactly how it works and the outcomes. then find the part that causes the issue and switch it out for something that doesn't cause the glitch.

if you've got any glitches you can't solve don't hesitate to ask them in help with scripts.
SuperSean12
Scratcher
500+ posts

How do you fix glitches and what are they?

glitches are when something wrong happens but it fixes it self, a bug is when the code is not how you want it to be

Powered by DjangoBB