Tilesets throwing errors A Lot of errors

Godot Version

GODOT 4.2.1

Question

Id like to preface this by saying I really appreciate the help I got here last time. User zdrmlpzdrmlp was implemental in identification of a pretty nasty bug.

Here in v4.2.1 I have gone by what this tutorial video says about how to generate tilemaps. I have created one very simple tile map with two very simple tilesets that comprise 2 platforms. One thing to point out is these errors were being thrown after the first tile set was created and the second tile set did not change anything about the errors being thrown.

It appears that I have missed some crucial step. When I run my scene for testing it continuously rolls over all my tilemaps throwing an error for each tile; hundreds of errors. The tiles appear fine in the scene and I have searched around in the documentation and it says to make sure tiles are not overlapping and to make sure I have not removed any tiles from the tile map. I have not changed my tile map and my tile set was made in the editor with grid snap on It does not appear that the tiles are overlapping and none of the tiles are not showing up properly. Everything looks fine… The current situation works fine but all these errors wont help the game run better and may cause build problems. I will be happy to include screen shots if that helps.
Many thanks for any help that can be administered.
I have included some of the errors below.

Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (31, 1).
TileSetAtlasSource has no tile at (31, 1).
Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (32, 1).
TileSetAtlasSource has no tile at (32, 1).
Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (33, 1).
TileSetAtlasSource has no tile at (33, 1).
Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (37, 1).
TileSetAtlasSource has no tile at (37, 1).
Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (38, 1).
TileSetAtlasSource has no tile at (38, 1).
Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
The TileSetAtlasSource atlas has no tile at (39, 1).
TileSetAtlasSource has no tile at (39, 1).

first, it’s because you try to code from godot 3.2 code to godot 4.2. many things has changed, follow the tutorial at your own risk, best is if you already know how to convert from Godot 3 to 4 code.

then you will want to show your tileset’s set here

the error basically said there’s no tiles at atlas coords of 37,1


as image above shown, currently im selecting tile at coords of 9,0

believe you should fill the set right

I would like to first point out that no coding has occurred here. I have used only the ui provided in this version to create tilemaps images and only used the ui to edit anything. these tile maps were created in this version and I have not asked the tilemaps to be creating any events with code. I have not asked the tilemaps part of the editor to pay attention to tiles that are moved changed or no longer there in any way by changing the tile map in any part of the process. I just dragged in a png changed some colliders around and clicked on boxes in the the grid with the corresponding brushes this creates for each tile.

Indeed you are correct This tut vid is for a different version but I have only used it for clues on how to use the ui. there are no scripts on my tile maps and they are not sending any signals. No part of this particular vid that Im aware of discusses any scripting.

With this in mind it is difficult for me to believe that differences in GDScript from version to version could be the cause of this issue.

In reguards to the picture you sent, I have a .PNG that is not a square being used for my tile set as you can see in this screen shot.


Could it be that Godot is expecting a square .png image here and because there are no tiles in any of the areas of a square below row 1 this could cause issue?
Please let me know if I can provide any more information.

as you can see the atlas at that middle only at 11, you will want to set the tile size here

so it fits the whole “39” long of square

Thinking about this for a sec I am curious if creating my tielmaps png in a 3rd party tilemaper software (like say the PRO Motion NG pixel editor that I used to generate this png image in the screenshot) could have added some form of metadata to the file I brought into Godot. Could the fact that this file does not cover the complete square of tiles the PRO Motion software might have exported some meta data for be talking to Godot and telling it there should be tiles there?

Thanks again for the help last time, It moved me ahead and I was able to proceed with learning for days.

I apologize I am having trouble understanding to what part of that picture you are referring. I do not see an 11 or a 39 anywhere. Here is a shot of my inspector. my tiles are 32 bit and I have set it for 32 bit.

you will need to set it from here
image

the 11 or 39 is what i meant from the
image

and error of


As you can see my tiles are still edited to 32 bit in that part of the window as well.

In this cut out you can in fact see that I do have a tile in the 11 spot. Why would it still throw an error stating that I do not?

what the error said now? no 11,0 tile?

Errors have not changed because I have not changed anything. All my settings were at 32bit to begin with.

All tiles from 1 to 39 throw the same error.

E 0:00:00:0828 has_alternative_tile: The TileSetAtlasSource atlas has no tile at (11, 1).
<C++ Error> Condition “!tiles.has(p_atlas_coords)” is true. Returning: false
<C++ Source> scene/resources/tile_set.cpp:4589 @ has_alternative_tile()
I have not added any alternative tiles. I have deleted my tile set and created a new one. errors are still thrown.

Not only do I have tile at 11 but all my tiles show up just fine and collide just fine even thought they keep throwing error the whole time debug session is running.

this basically mean there’s no tile at x:11 and y:1
right now as you have is only x:11 and y:0 tile, and there are no tiles at y:1

I guess I could delete this all and try again a 3rd time cataloging everything I do with screen shots waiting till the errors pop up and documenting when that is and what I did to cause them. Then I can try to come up with a way to do it differently, or at least ask questions from a more informed standpoint. That will take some time. I will go do that and come back when I know more about this issue. Then maybe I can ask about what is wrong better.

I greatly appreciate the help even if we have yet to clarify this issue. Knowing what I am supposed to be checking/where I am supposed to be checking is very helpful and these answers may fix the issue after I fiddle with it a bit. Be back soon after trying this from a new project with nothing else going on.

Made a quick windows build of that project and famously it still builds and runs fine outside of the editor while it is throwing all those errors. Thats super cool incase you get a project looking complete and and cannot track down one bug or another, but probably not gonna make it run better. lol, bout to make empty project and document every move I make. We will see if this runs into similar errors with the same tileset


Here I am having added a node 2d to the starting scene and a separate tilemap scene. I find it cool that plays without throwing error. Awesome and interesting!


Heres me adding a new tileset to my tilemap scene.


Here is me clicking on auto create tiles in non transparrent areas. After making an assets folder, placing a tilemap .png file in the folder, and dragging it from the file system to the tiles tab area for it in the tileset bottom tab.


After clicking that yes button it has added a bunch of 16 bit tiles. This may be my error issue right here. I need 32 bit. It just made a bunch of extra tiles. When I resize to 32 bit…


As you can see a bunch of the tiles that got created get pushed down out of my tilemap png. That could cause the editor to be looking for tiles down there in those orange squares outside of my .png. I am not sure this is whats causing the errors, but making this attempt to better define the problem and track the issue from the beginning is narrowing down where the issue is for sure. Please let me know if you think this is the issue. I think it may very well be. Im going to keep testing.

Wow! I really do think I tracked this down!


Here after adding nothing else to the project I have painted three of these tiles that I resized to 32 bit in the tileset editor causing the orange squares to appear outside my png’s area. Then i have added a single instance of my tilemap scene to the main level scene and hit play. And what do I see but 160 something errors!

This just about proves that I have made the mistake of hitting yes on the auto create tiles pop up that comes when one has added their tiled image to the tileset editor. If I am correct about this I should now be able to re try this without hitting that button and make my own tiles in the png image space and not have any extra the computer might be checking for and throwing errors when it cannot find. Here’s hoping anyhow.