Set text to input does not take strings correctly if the input is a number

If you set text to input and the input it just digits, it treats the input as a number instead of a string. This gets rid of any leading 0s and is incredibly annoying.

15 Likes

I’m sorry about 014

8 Likes

That’s how numbers work. Also, works as intended.

Would be cool if we were able to force inputs to be a string instead of a numeral. Sort of like dim example as string (I typed Visual Basic because I don’t know the syntax for defining variables as string in JS).

2 Likes

Yes, this is terrible. Maybe Hopscotch should make an option to set it to an integer, like in Python.

3 Likes

That would still remove any leading zeros though (because it’s the same as floor(number input)).

2 Likes

Now that I’m thinking about it, I think it’s “str x;”, since I know how to define integers: “int x;”

1 Like

Wait what happened?

1 Like

I was just think about that :slightly_smiling_face:

1 Like

Rip 00

You can’t set 014 as it treats it as a number and it will become 14

1 Like

Huh
Seems weird but kinda reasonable
Congratulations on 014 likes muahaha