What? Why does this happen?

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.imagemyTile1, 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?

Can you share your code?

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

1 Like

did you find the issue @UnsignedArduino ?

No - :frowning: 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 :joy:

1 Like

I think this is it with the thing fixed: 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, which is probably the cause but unclear how that got there.)

2 Likes

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:

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

3 Likes

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

Seems like my code is auto generating wrong a lot!

Hm, it’s this guy again: image

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