# What? Why does this happen?

**URL:** <https://forum.makecode.com/t/what-why-does-this-happen/6976>\
**Category:** Help\
**Created:** [March 24, 2021, 9:44pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976 "2021-03-24T21:44:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 24, 2021, 9:44pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/1 "2021-03-24T21:44:06Z")

</div>

What do you do when a problem in the images.g.ts? I’m on javascript if that changes anything, here’s my code:

scene.onOverlapTile(SpriteKind.Player,assets.image`myTile1`, function(sprite: Sprite, location: tiles.Location) {  
game.over(false)  
})

Can you fix this? You cant even edit the code inside of that so what do I do?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 24, 2021, 9:54pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/2 "2021-03-24T21:54:00Z")

</div>

Can you share your code?

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 24, 2021, 10:23pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/3 "2021-03-24T22:23:56Z")

</div>

grrr that’s a game that is in progress that I dont wanna share yet, but ok

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 24, 2021, 10:24pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/4 "2021-03-24T22:24:39Z")

</div>

> **[speedrun secret](https://arcade.makecode.com/47784-71566-25039-14667)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 24, 2021, 10:52pm UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/5 "2021-03-24T22:52:24Z")

</div>

did you find the issue @UnsignedArduino ?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 25, 2021, 12:24am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/6 "2021-03-25T00:24:59Z")

</div>

No - ☹ seems like that code was autogenerated incorrectly so that might be a bug - someone like @jwunderl or @richard may know. (Sorry for ping) My brain is currently too small to figure out such a problem. And I didn’t write it so I don’t really understand the internals 😂

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [March 25, 2021, 12:34am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/7 "2021-03-25T00:34:56Z")

</div>

I think this is it with the thing fixed: [https://makecode.com/\_aj3PEP1ucg8L](https://makecode.com/_aj3PEP1ucg8L)

@richard Have you ever seen it drop a random return in `images.g.ts` before? I noticed that the tile was getting called as an image in one spot, deleting the asset in the assets view fixed it here. (also this empty text entry showing up in `images.g.jres` is weird ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f1eb3aee4e997012155cca1e0610ca5e2792e93d.png), which is probably the cause but unclear how that got there.)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 25, 2021, 12:37am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/8 "2021-03-25T00:37:36Z")

</div>

yeah I’m not sure what happened here… definitely a makecode bug. i haven’t seen the return thing before but it might be related to the empty string name. i did open a bug related to that the other day:

> <https://github.com/microsoft/pxt-arcade/issues/3187>
>
> You can assign tiles to have invalid names in the tilemap editor. Specifically, you can assign names of other tiles (which...

(also @UnsignedArduino no need to apologize! I don’t mind pings, especially when there might be bugs afoot)

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 25, 2021, 1:15am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/9 "2021-03-25T01:15:57Z")

</div>

my goodness it happened again @jwunderl (I’m sorry if I pinged you at a wrong time)

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [March 25, 2021, 1:16am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/10 "2021-03-25T01:16:08Z")

</div>

> **[Night at Nolby's](https://arcade.makecode.com/47310-37692-01330-32158)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Seems like my code is auto generating wrong a lot!

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [March 25, 2021, 1:18am UTC](https://forum.makecode.com/t/what-why-does-this-happen/6976/11 "2021-03-25T01:18:37Z")

</div>

Hm, it’s this guy again: ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/852490777614347ab4566e805b6ad7d197100f4e.png)

To confirm these are both written in typescript / come after using `assets.image` ` ` ? I’m assuming not using the assets tab?

This looks fixed for now but it’ll probably happen again, the fix was going to assets and deleting the empty first image: [https://makecode.com/\_8CVVwRbV18pm](https://makecode.com/_8CVVwRbV18pm)
