My code doesn’t work (it is fixed now)

code
debug

#1

Please try to debug this!
https://c.gethopscotch.com/p/z01gkd5dm
The 2 darker blues don’t work


#2

By the way the colors I’m talking about are the circled ones


#3

Hai there @CheckyWecky!

So I’ve checked the code and it appears to me that you haven’t put a rule determining the change in values in the last few colours rows, thus causing the colours not to change later.

This doesn’t appear to happen to just those two colours but every other colour after it.

Hopefully this helped you!


#4

I think it is a WIP. What it is, her HSBs for the circles were different from the trail’s HSBs


Hope this helps.


#5

They appeared to be find tho?
*shrugs *

I’m not good at debugging codes…


#6

Oh wait it works now


#7

Okie cool.

glad we could help?


#8

On the original? Idk. You had the trail color coded up to 36, but the when self is tapped set color to __ in the circles were only coded up to the circle with the color of 35


#9

Well yeah but I actually just figured it out myself


#10

Huh i dont get that but never mind


#11

In the + code, you had a when color=36, but when you look at the circles, the when self is taped set color to __ stops at the circle where it says set color to 35.


#12

Well yeah that was the mistake, the circle was supposed to be 36 but it wasn’t because there were two 34s


#13

Oooooh, I didn’t see that. I just practically went and started on the next column.


#14


T1 just remixed it with improvements.


#15

Noo again

The lighter yellow colors are weird and I can’t fix it because everything is all weird and it’s too confusing, I’m not sure if it’s possible to fix.

Please try to fix it


#16

Hai @CheckyWecky,

So I guessed you haven’t found a solution to the bug yet so I looked over your code.
Turns out the lightest yellow, when tapped, was setting the value ‘colour’ to 95 which was the colour for the lightest shade of the ‘lime’ colour. It was easy to fix and I changed the lightest yellow, when tapped, to set the value to 96 which made the right colour trail be drawn.

Common mistake. Sometimes I even do that :)

Hope I could help :3


#17

thanks madsie

Idk why when i look at the code it seems to be normal when it isn’t actually


#18

Just a quick thought–couldn’t you set the HSB values in the circles instead of a single colour value? It might make drawing slightly less laggy.