Discuss Scratch

ARandomNumberIs7482
Scratcher
1000+ posts

Can a script ever not work?

I don't mean “not work” as in there's a bunch of bugs within the script, or whether it's a script that'll crash your browser, but as in if you were coding in javascript, and spammed your keyboard with a bunch of nonsense (example: hoqhguhelffdsnfaefiwuriewu).

Edit: The script has to be a script, so you can't do anything like
when green flag clicked
when green flag clicked
(volume)

Last edited by ARandomNumberIs7482 (March 4, 2023 23:08:59)

back_it_up
Scratcher
100+ posts

Can a script ever not work?

ARandomNumberIs7482 wrote:

I don't mean “not work” as in there's a bunch of bugs within the script, or whether it's a script that'll crash your browser, but as in if you were coding in javascript, and spammed your keyboard with a bunch of nonsense (example: hoqhguhelffdsnfaefiwuriewu).

Edit: The script has to be a script, so you can't do anything like
when green flag clicked
when green flag clicked
(volume)
hmm, could you simplify what you mean? sometimes my braincells can't process anything
INSERT-USER_NAME
Scratcher
1000+ posts

Can a script ever not work?

I can't really think of anything other than this script. It probably doesn't count since it just doesn't run instead of not working, but it's all I can do.

when something happens I guess :: events hat
repeat ((1) - (2))
say [I shouldn't say anything]
end
medians
Scratcher
1000+ posts

Can a script ever not work?

Would this count?
Meant to return NaN.


3.0:

jackson49
Scratcher
1000+ posts

Can a script ever not work?

There isn’t really anything that’s equivalent to what you’re talking about. There’s scripts that don’t run, but none that result in the kind of syntax error you’re talking about. For the most part, there can’t be, as it’s a block-based programming language.

The closest thing is probably the “Infinity” result you get from trying to do invalid math. There’s also the Undefined Hat Block.

Last edited by jackson49 (March 5, 2023 18:34:36)

PPPDUD
Scratcher
1000+ posts

Can a script ever not work?

jackson49 wrote:

There’s some scripts that flat-out cause Scratch to crash. I suppose that would count as a script not doing what it’s supposed to do.

It’s against the Terms of Use to actually share a project using them, though.
That doesn't count.
blablablahello
Scratcher
1000+ posts

Can a script ever not work?

I dont believe there are any possible scripts that can “error” without using hacked blocks, pretty sure ST (and Javascript) has put a “just in case” for basically every situation (like what medians showed, it returns NaN, but it doesn't completely break stuff)
PkmnQ
Scratcher
1000+ posts

Can a script ever not work?

Closest I can get is a block name, not a script. Name a custom block %, and look at the console. I don't think it should count because when you run it, it works just fine. It's just the naming that's broken.
CST1229
Scratcher
1000+ posts

Can a script ever not work?

There are probably also (JSON hacked) scripts that throw VM errors, but those are probably more like runtime errors than syntax errors.
Mrnoob3003
Scratcher
100+ posts

Can a script ever not work?

when green flag clicked
if <[1] = [2]> then
do stuff
end

would this count?
medians
Scratcher
1000+ posts

Can a script ever not work?

PkmnQ wrote:

Closest I can get is a block name, not a script. Name a custom block %, and look at the console. I don't think it should count because when you run it, it works just fine. It's just the naming that's broken.
Oh my god that's an annoying bug LOL, I have a project with a ton of variables but it loads up to this bug in 3.0, and I can't change it or it would break.

Mrnoob3003 wrote:

when green flag clicked
if <[1] = [2]> then
do stuff
end

would this count?
I'm not sure, but would a lot of old projects count?? By this I mean that they used to work in the past, but newer versions of Scratch broke the project.
blablablahello
Scratcher
1000+ posts

Can a script ever not work?

medians wrote:

PkmnQ wrote:

Closest I can get is a block name, not a script. Name a custom block %, and look at the console. I don't think it should count because when you run it, it works just fine. It's just the naming that's broken.
Oh my god that's an annoying bug LOL, I have a project with a ton of variables but it loads up to this bug in 3.0, and I can't change it or it would break.

Mrnoob3003 wrote:

when green flag clicked
if <[1] = [2]> then
do stuff
end

would this count?
I'm not sure, but would a lot of old projects count?? By this I mean that they used to work in the past, but newer versions of Scratch broke the project.
actually thats a good point: any project that used to work but now crashes counts, as the reason errors exists in the first place is to prevent things such as crashes or to allow the computer to handle a situation it normal cannot (which normally results in a crash anyways)
medians
Scratcher
1000+ posts

Can a script ever not work?

blablablahello wrote:

actually thats a good point: any project that used to work but now crashes counts, as the reason errors exists in the first place is to prevent things such as crashes or to allow the computer to handle a situation it normal cannot (which normally results in a crash anyways)
Would these projects count then?
https://scratch.mit.edu/studios/32940712/
The thing with these though is that the scripts aren't the broken part I believe, but they are still “broken” I guess.

Last edited by medians (March 8, 2023 00:45:22)

KittyCatKayden
Scratcher
1000+ posts

Can a script ever not work?

medians wrote:

Would this count?
Meant to return NaN.


3.0:

That 3.0 image has colors from 2.0. I wonder why…
Edit: Now I just realised that the blocks are also shaped more like 2.0! (except for the define block, which has the shape from 3.0 but the color from 2.0)

Last edited by KittyCatKayden (March 8, 2023 05:38:18)

INSERT-USER_NAME
Scratcher
1000+ posts

Can a script ever not work?

KittyCatKayden wrote:

medians wrote:

Would this count?
Meant to return NaN.


3.0:

That 3.0 image has colors from 2.0. I wonder why…
Edit: Now I just realised that the blocks are also shaped more like 2.0! (except for the define block, which has the shape from 3.0 but the color from 2.0)
They're either using the funny or they're on turbowarp.
lgrov44
Scratcher
500+ posts

Can a script ever not work?

How about this:
when green flag clicked
repeat (1.5)
move (1) steps
end
blablablahello
Scratcher
1000+ posts

Can a script ever not work?

medians wrote:

blablablahello wrote:

actually thats a good point: any project that used to work but now crashes counts, as the reason errors exists in the first place is to prevent things such as crashes or to allow the computer to handle a situation it normal cannot (which normally results in a crash anyways)
Would these projects count then?
https://scratch.mit.edu/studios/32940712/
The thing with these though is that the scripts aren't the broken part I believe, but they are still “broken” I guess.
I believe so, as scratch is unable to load it, which would be the same thing if you made a program in a text based language and mispelt something, it is unable to run.

lgrov44 wrote:

How about this:
when green flag clicked
repeat (1.5)
move (1) steps
end
no, that would just repat once (or twice if it does ceiling)

KittyCatKayden
Scratcher
1000+ posts

Can a script ever not work?

INSERT-USER_NAME wrote:

KittyCatKayden wrote:

medians wrote:

Would this count?
Meant to return NaN.


3.0:

That 3.0 image has colors from 2.0. I wonder why…
Edit: Now I just realised that the blocks are also shaped more like 2.0! (except for the define block, which has the shape from 3.0 but the color from 2.0)
They're either using the funny or they're on turbowarp.
I just tried TurboWarp and I found addons that allow me to make my blocks match 2.0's design! Funny enough, I was able to use the 3.0 Cat Blocks from April Fools Day with the old block shape and colors…
It's cool how TurboWarp can be customized.
medians
Scratcher
1000+ posts

Can a script ever not work?

INSERT-USER_NAME wrote:

They're either using the funny or they're on turbowarp.
I’m using the funny.
I wish 3.0 still had the custom block arc though

Last edited by medians (March 8, 2023 14:19:50)

mybearworld
Scratcher
1000+ posts

Can a script ever not work?

(1)/(0)
in 1.4.

Powered by DjangoBB