Oops, something went wrong trying to convert your code

One day, I was working on a platformer game based on “Jumpy Platformer”(in blocks). I switched in Javascript and it just happened that it said “Oops, something went wrong trying to convert your code.” I didn’t write or do anything. What should I do to fix this and prevent this from happening again.

This sounds like a bug. Would you mind sharing your project?

Here’s my project :

This is a bug on our end; the issue is that in the call to scene.onOverlapTile() you passed an image literal (img`...` ) instead of something of the form mytiles.tile1.

To workaround this issue you should always declare images that you want to use in tile blocks inside of that namespace with a name of the form tile# where # is a positive integer. For example,

namespace myTiles {
    //% blockIdentity=images._tile
    export const tile0 = img`
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
    `
    //% blockIdentity=images._tile
    export const tile1 = img`
        e d f . . . . . . . . . . f e d
        e d f f f f f f f f f f f f e d
        e d d d d d d d d d d d d d e d
        e d e e e e e e e e e e e e e d
        e d f f f f f f f f f f f f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f f f f f f f f f f f f e d
        e d d d d d d d d d d d d d e d
        e d e e e e e e e e e e e e e d
        e d f f f f f f f f f f f f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
    `
}

I’ve opened an issue for this here: https://github.com/microsoft/pxt-arcade/issues/1738

And here is a version of your code that goes back to blocks:

Sorry that you ran into this!

Thanks for such a fast response!