Conversion Error

This is the Marioish game I have been creating in Block Based Code only. I left it for about a week and came back and it won’t allow me to “Convert” back to Block Based code.

3 Likes

Your todo comment section is somehow causing your troubles:
Screenshot 2023-10-03 at 21.44.54

Remove it, and - voilà - your code converts back to blocks:

this is absolutely a bug in makecode! i’ll file it.

3 Likes

here’s the issue:

specifically, the unamused face emoji is what’s breaking the conversion to blocks.

1 Like

put // in front to make it a comment so it doesn’t interfere

1 Like

I’m guessing that’s because the compiler gets confused with the multiline string, because that’s the only way you can write comments in python. It doesn’t know how to convert that to blocks

2 Likes

Thank you all for the insight! I really appreciate it very much!

2 Likes

It’s python, // doesn’t work

3 Likes

@Sarge we do actually handle free floating multiline strings in python! They get converted into multiline comments.

We just don’t handle certain emojis, apparently. If you delete the emojis the code should convert cleanly.

3 Likes

If you did it on java, then converted would that work? or do it in blocks then convert

1 Like

Where are my manners?

Welcome, by the way, @CaptainSniffy!!!

1 Like

A comment is actually #

2 Likes

javascript Idk I’d have to test that. It might just be a conversion error when converting blocks, or maybe it affects JS too

Thanks! In javascript it’s //

Seems to prevent conversion from JavaScript to blocks with icons inside string literals, as well:

I’m having this same issue, but I don’t know why. All I did was switch from blocks to JavaScript and back. Here’s the project:

2 Likes

Nice music and graphics!

2 Likes