An Issue With My Game Code, Really Simple but hard to access

I’m making a new sequel to a previous game called Polygon Run 2, using a map from a “Decked Out Remix” game that I really liked. I used the map from the game but otherwise am coding Polygon Run 2 from scratch. The map has a tiny, seemenly unfixable problem with one of its tiles, and I can’t fix it because I can only see it in Explorer with read-only no edit mode. Here is the link to the project and the issue:

Here is the problem: Line 60: Cannot redeclare block-scoped variable ‘transparency16’.
It is in the Explorer under category tilemap.g.ts
You can view it in Javascript! Thanks in advance!

1 Like

It is most likely a problem with an extension that you are using. That’s an error that usually comes up when using an extension with an asset built into it (I think). That’s what happened to me at least. You’re most likely going to have to find the broken one and remove it to fix the error.

1 Like

This is an error with one of your extensions:

This specific error happens when you have more than one tilemap.g.ts files, which are the files that define tiles, and since the blank “transparency16” tile is always in this file, having more than one will create duplicates of those tiles, which doesn’t work.

Removing the “Polygon Run 2 (Remix Of Decked Out)”, then removing the “.json” version of this file fixed the issue. When I convert back to blocks, I clicked “discard and go to blocks” but the issue is still fixed! You really shouldn’t do… whatever you did to share assets projects. I don’t know if there is a better way (I don’t know if copy/pasting blocks works with tilemaps) but the one you used doesn’t work.

1 Like