Why is this an error

1 Like

We need to see more code than that. You can click on the warning sign to see what it says. If you can’t figure it out you can share the project and we’ll help!

Most likely it’s because either “arrow” is not an array of sprites or because “spriteSpeed” is not a number. Actually, I think the “spriteSpeed” variable would be highlighted as well if it was the issue, though I may be mistaken.

I need the actual sprite instead of the image of the sprite

1 Like

You can put sprites into arrays just fine. I do it all the time. Please share your code so I can actually help!

https://arcade.makecode.com/S74355-85178-45520-63363

1 Like

Well, I fixed the error, but…

You should probably wait for woofwoof’s reply he’s good at this.

3 Likes


That second line of code is the one that creates the sprite. You’ll want that to be above the one that moves the sprite. A sprite needs to exist before you can do something to it.

Well, once that is fixed it will be creating a new sprite every time. What you need is to get random from an array of those already created sprites, like this:

Here’s the link to my version:

4 Likes

Would have been really funny if mine was approved first lol

@AlexK that’s alright. Just do your best! You’re already a saint for approving posts on the weekends! :heart_hands:

4 Likes

I do try to approve posts in the right order. :smiley: The new review screens in Discourse seem to select posts at random, though, which is a bit … frustrating.

3 Likes

Thank you very much

1 Like