Incorrect colors as squares

Project link:

1-sentence description of the issue:
Incorrect colors as squares

What do you want your code to do?
Be green or dark green based on the tile string
It is supposed to be dark green once.
1 = green 2 = dark green

What is the code currently doing?
Being dark green 3 times

Screenshots:

8 Likes

I checked it out, did a little debugging and realized that it stops acknowledging the 1 as a 1 (or something like that, doesn’t make much sense) and does the else option instead.
I noticed that if you split the string in tile to multiple paragraphs, it fixes the problem. Not sure what causes it.

I’m wondering if you use letters instead of numbers you might not have to split the string.

I’ll bet @/Tri-Angle is gonna give a better resolution~

8 Likes

i did not check the code and i bet that adding a non-number character at the end of the string will fix the problem :sunglasses:

edit: confirmed, adding a non-number character wherever in the variable fixes the problem - hopscotch is struggling with big numbers.
if you saw my post explaining my new pixel art method and you’re trying to implement my concept in your code, please give me a temporary credit until the official release. thank you.

7 Likes

Floating point // rounding errors

Add a character to the string that’s not a number before getting characters between () and ()

7 Likes

Imo, it’s probably just easier to use letters instead of numbers. At least you can avoid this issue altogether.

6 Likes

I used a backslash because spaces or letters might confuse me.

6 Likes

I wasn’t, I was just trying to make cool tiles without using clones

6 Likes

okay good to hear, because mine is exactly like yours but with algebra haha :sweat_smile: good luck on your project ;)

6 Likes

@Bobinny, i think the bug has been fixed, right?

ugh i really hope we have pokes

1 Like

Yep this is solved

1 Like

I think poking people to topics are gone