Blank text

untitled script pic (39)

untitled script pic (40)

Why this is not the same? I mean, the blank text.

I need to use a blank text in mapping, but i can't just use regular blank text since it goes for mapping inputs.

untitled script pic (50)
untitled script pic (42)

untitled script pic (45)
untitled script pic (46)

I decided to use this for maps, not sure if its the best way.

untitled script pic (48)

untitled script pic (49)

So, using variable is faster than using that

The first of those should really give an error, but we sort of inherited from Scratch the idea that there shouldn't be any errors—every expression should give some answer, often zero if there's no better answer.

untitled script pic


In the first example, the empty text has length zero because there are no characters in it. Thus, UNICODE OF the empty text is meaningless, because there isn't a character in the empty text, and it's characters, not strings, that have Unicode values.

In the second example, Unicode code 0 represents the character NULL, which has no visible rendering. But it's still a character, so it's a text string of one character, so its length is one. It's the same idea as these being different:
untitled script pic (3)
untitled script pic (4)

Thanks for the answer! Interesting, what do you think of my way getting blank text for maps though? I mean, using variable causes some problems with which i can't use them, using untitled script pic (45) works fine, but i have a feeling of it being a bad way.

untitled script pic (51)

untitled script pic (52)

By the way, why the second is slower?

Not so if MAP is compiled:

its still slower by one millisecond

i can't get compiled map working sometimes, idk why, so this is not a perfect choice for me

If the function you're mapping is too complicated, it can't be compiled. But the function xx + 1 should always work!

"Blank text" is actually sort of ambiguous, because people sometimes use "blank" to mean the space character, Unicode 32. So you should get in the habit of saying "empty" or "space," unless you mean the blank symbol ␢, Unicode 9250, which is used as a visible representation of a space in program documentation.

But assuming, from the rest of the thread, that you mean an empty text, untitled script pic is as good a way as any.

can i get those scripts? i am not able to import them, idk why

Click on the image, then drag the image that popped up into the editor.
[EDIT: I don't have to click on the image; I can just drag it directly without the pop-up]

Sherlock, they get imported like costumes not like blocks.

Well, what I described is how I got the script import working for me.

weird, it did now, its not the first time i sometimes can't get them loaded, i wonder if that is because of how i downloaded it

I don't know why, but sometimes, you have to click on the script to see image in a window like this:


in this case, you have to download this image...

(qw23 image on the forum when your mouse is over the image)

Compare my script images (result pic in this case):
![untitled script pic (45)|132x29]
DefautProject script pic

Did you notice: the width/height on my image is not the same as qw23's image...

@qw23: can you share with us how do you share scripts on the forum, your browser, etc

i don't know if it's a forum problem, browser problem or user problem !


test
Weird, it worked for me even without opening it, looks like @qw23 images smh are weird xd
It is not the first time i can't load his images

Two things:

  1. If the image is wider than the text area, the forum will shrink it to display it. Those shrinked images don't contain the metadata in the original. That's why you sometimes have to show the original image: it happens when the image is wide.

  2. You have to drag the image into the Scripts tab. If you have the Costumes tab showing, then the image will be imported as a costume (but the metadata is still there, and you can get at it by right-clicking the image). In this case, the image will be displayed in the Costumes tab with a "</>" in the corner to indicate that it contains code.

I recognize the phenomenon, but have no clue as to the underlying mechanism.

Retina display support" enabled (browser zoom enabled, Mac OS, or ultra high resolution display with DPR <>1) and/or "Zoom blocks..." change the resolution of the pictures.

FullHD, 1920x1080, DPR=1, Chrome@Win10, non-retina
1.0x Zoom block, 427x61px
Untitled script pic - 2023-05-20T225320.483
1.4x Zoom block, 586x85px
Untitled script pic - 2023-05-20T230538.081
2.0x Zoom block, 690x97px