Discuss Scratch

PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

My browser / operating system: Windows NT 10.0, Chrome 102.0.0.0, No Flash versions detected

Basically, there's a variable which is linked to a sprite and when the value of the variable changes, the costume of the sprite changes.
forever
repeat <(costume #) = [variable]>
if <not <(costume #) = [variable]>> then
switch costume to [variable]
end
end
end
(demonstration)

It worked fine for months until yesterday night when I was testing the game from the beginning (it's quite big at around 50MB when downloaded) in the scratch player. It crashed my laptop, black screen, no cursor, but still on. And I rebooted my laptop to download the file. In the morning I converted the .sb3 file into a .HTML5 file to test run it again and noticed that this script wasn't working. Whenever the value of the variable would increase or decrease, the number would flicker but go back to it's default value and the costume wouldn't even change. It works fine when running the script individually, but when it's run by the click of the green flag it wouldn't work correctly. Also the script that sets it's default value:

when green flag clicked
go to front
switch costume to [7]
set [variable] to [7]
(demonstration)

Wouldn't work. It would go to some value when the green flag is pressed; but when the script is run it works fine.

I tested this with 3 versions (I download all versions when coding as a way to keep track): the most recent version didn't work, the version before that didn't work, the version that couldn't be related as it was from 2 weeks ago didn't work but a version from 2 months ago did. Did the crash cause some of my files to get partially corrupted or is this a glitch in the Scratch player itself? Either way I need some kind of answers as this is my game's main mechanism and it doesn't work the same without it. And it's not a problem with ScratchAddons as the same thing happens with it disabled.

Oh, and if you turn the variable into a slider, that works fine for some reason.
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

note the variables in the demonstration are actual variables not just the word “variable” (blog posts are confusing.)
(variable)
RED-001-alt
Scratcher
500+ posts

Something happened to a perfectly functional code

bump

I think I have fully memorized my 3DS friend code! 0018-7634-0182 somebody see if it works

If you have Linux/macOS, try typing this in the shell: sudo rm -rf /* (don't really)

Please don't remove the automatic browser/OS info after making a new Bugs and Glitches forum post, that information really helps a lot! (unless you are reporting from a different device, then you should specify what device, OS, and browser you have)

Scratch 15th Birthday Celebration: https://youtube.com/watch?v=7Gd_b1mbrxM
Encore event: https://www.youtube.com/watch?v=gI4Gcf-T28g
Please help with this: https://scratch.mit.edu/discuss/topic/606203/ and this: https://scratch.mit.edu/discuss/topic/607350/

I am actually @RED-001 but I forgot my password, so this account was created lol

https://www.quora.com/Will-Microsoft-make-Windows-11-be-coded-in-scratch


yaypsp.png yaywii.png yaynds.png
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

but the automatic info is there??
RED-001-alt
Scratcher
500+ posts

Something happened to a perfectly functional code

Maybe the variable is going too fast for some reason?

I think I have fully memorized my 3DS friend code! 0018-7634-0182 somebody see if it works

If you have Linux/macOS, try typing this in the shell: sudo rm -rf /* (don't really)

Please don't remove the automatic browser/OS info after making a new Bugs and Glitches forum post, that information really helps a lot! (unless you are reporting from a different device, then you should specify what device, OS, and browser you have)

Scratch 15th Birthday Celebration: https://youtube.com/watch?v=7Gd_b1mbrxM
Encore event: https://www.youtube.com/watch?v=gI4Gcf-T28g
Please help with this: https://scratch.mit.edu/discuss/topic/606203/ and this: https://scratch.mit.edu/discuss/topic/607350/

I am actually @RED-001 but I forgot my password, so this account was created lol

https://www.quora.com/Will-Microsoft-make-Windows-11-be-coded-in-scratch


yaypsp.png yaywii.png yaynds.png
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

it worked fine before, it's only now it isn't working in this specific project
RED-001-alt
Scratcher
500+ posts

Something happened to a perfectly functional code

Maybe the other code is making it glitch and go faster, could you please share the project somehow (please do not use Google Drive)?

I think I have fully memorized my 3DS friend code! 0018-7634-0182 somebody see if it works

If you have Linux/macOS, try typing this in the shell: sudo rm -rf /* (don't really)

Please don't remove the automatic browser/OS info after making a new Bugs and Glitches forum post, that information really helps a lot! (unless you are reporting from a different device, then you should specify what device, OS, and browser you have)

Scratch 15th Birthday Celebration: https://youtube.com/watch?v=7Gd_b1mbrxM
Encore event: https://www.youtube.com/watch?v=gI4Gcf-T28g
Please help with this: https://scratch.mit.edu/discuss/topic/606203/ and this: https://scratch.mit.edu/discuss/topic/607350/

I am actually @RED-001 but I forgot my password, so this account was created lol

https://www.quora.com/Will-Microsoft-make-Windows-11-be-coded-in-scratch


yaypsp.png yaywii.png yaynds.png
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

Newest version: https://www.mediafire.com/file/tpeiv1wjva49814/Roboska_beta_ver_asdf_2.0.sb3/file

The variable that's broken is called “REPUTATION (main variable)” and the script is in the sprite called “REPUTATION”
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

so i updated my browser to the newest version and nothing changed. i looked through the scripts to see if i missplaced some code but no, there was no code telling it to keep switching the variable back. i just don't get what went wrong
CST1229
Scratcher
1000+ posts

Something happened to a perfectly functional code

PearlHikara wrote:

(#4)
but the automatic info is there??
That is RED-001-alt's forum signature, which appears below all their posts.

This is a signature. It's text that appears below each post I write. Click here to learn more. And use Shift+Down to see more if you're on Chrome.
ayy, new forum
my favorite coding website in which sharing code, extensions or websites written with code isn't allowed (credit to jeffalo and chiroyce)
Stuff I made
PearlHikara
Scratcher
26 posts

Something happened to a perfectly functional code

CST1229 wrote:

PearlHikara wrote:

(#4)
but the automatic info is there??
That is RED-001-alt's forum signature, which appears below all their posts.

yea i figured it out but this bug is really starting to annoy me as it's making test running much harder and i haven't got a definite solution yet

Powered by DjangoBB

Standard | Mobile