Bug, or incorrect code (please come to topic if your a clone pixelartist)


#1

I don't know if this is a bug or just my terrible code
Use this template to make awesome bug reports:

Your username: Dolphin Coders

What kind of device are you using?: IPad Air 2

1 sentence description of the problem (I was doing _________, and then __________ happened): I was trying to code a clone pixel art with black, repeat 7 green, black but then the both black was at the end

Steps to make the problem happen:
1. Code project incorrectly??
2.
….

I expected this to happen:
For the code to be black, 7 green, black
But instead this happened:
7 green, black, black
Here’s a sweet screenshot:

@t1_hopscotch @Dylan329 ?


#2

That's strange :thinking: I am just wondering, what is the Black ability and the Repeat(?) at the very top of the screenshot?


#3

Well that's repeat 7 black (in the black there's a create a clone black, an increase X and set value colour,)

I've checked all the code of colours and the black and green have the same code except for the set colour value

@t1_hopscotch


#4

Ohhh okay I see :smile: β€” so you're talking about the second line in the pixel art that's not going as expected.

The code looks fine so that is strange...

Sorry I was just working through my notifications :stuck_out_tongue:


#5

Yeah I've checked various times with colours and mixing them but it still has the same result

also it's different from your code in clone pixel art ;D


#6

Oh I just realised this was clone pixel art :smiley:

Do you think I could see the code for the clones? – creating the clones and in When object is cloned


#7

Ok! I think I'm clogging up this topic XD

Here's all the code

@t1_hopscotch this basically isn't all the code that's just the main bits


#8

Ah okay I see, thanks for putting those :smiley:

It looks like it might be to do with timing :thinking: When the object is cloned, by the time it reaches the code for checking its colour, maybe The colour has been changed to a different number already?


#9

Hmm I just added wait milliseconds and it worked!!

Here's the code

.

But if it only worked with milliseconds does that mean I have to do it with every colour?


#10

Ooooh yay!!!

Hmm 500 ms does feel like a noticeable amount of time for us. Sometimes I find 1 ms is enough for the code – maybe see how that goes?


#11

No, 1 doesn't seem to work @t1_hopscotch


#12

I did 50ms and it worked fine and the speed it reasonable ! TYSM @t1_hopscotch!!!


#13

if anyone has any other ways to fix this bug feel free to comment!


#14

Oooh yaaay!!! :smile::smile:

I'm really glad at how you were working through that yourself! even if with me just pointing out or asking about a few things.

(That debugging description from the template in the top post actually really helped with understanding what was going on too :open_mouth: β€” what you expected to happen, and what was actually happening. I'm gonna keep that in mind for when I run into trouble with coding :joy:)


#15

A few more bugs occurred while I was coding here they're

Here's the Bug

when I shrink the block the end bit of code becomes bigger

@moderators? @liza? @Rodrigo?


#16

Weird that I didn't get a notification for this... :thinking:

Do you think I'd be able to see the code? :relaxed: I may not be able to check on until later on though.


#17

Hello @Dolphin_coders I am here again if you happen to be on :smiley:


#18

Sorry, I'm not able to be on the forum rn, I might explain tomorrow :wink:


#19

No worries, all good! :smile:


#20

@t1_hopscotch do you want to see both bugs Code?