Godot Version
Godot_v4.6.1
Question
Why is the below error message appearing in my debugger?
E 0:00:01:071 set_terrain: Condition "terrain_set < 0 && p_terrain != -1" is true.
<C++ Source> scene/resources/2d/tile_set.cpp:6521 @ set_terrain()
Hello, I’m new to gdscript and Godot in general. I’ve been following a Godot 4 platformer tutorial on YouTube. I’ve mostly been able to figure out bugs by myself but this one has stumped me.
The errors started around the time I added my tile-map and set up a few terrains. I’ve set up two Tile map layers each with the same 112x112 image, with each tile being 8x8. The first layer currently has 1 terrain set with 3 terrains, the second 1 terrain set with 1 terrain. I’ve made both Tile map layers their own scene and instanced them in the main scene. Tile map layer 1 is at Z 0 and Tile map layer 2 is at Z 1. In the main scene I have drawn a platform with Layer 1 terrain set 0 terrain 0, and added some moss with Layer 2 terrain set 0 terrain 0. Neither seem to be the cause of the issue as removing either does not stop the error message from occurring.
The errors show up in the debugger every time I run the game, always the same amount(17 plus 2 from undefined delta functions). Each time I run the game have they a different time stamp, but all red errors have the same time stamp within each run. The errors don’t crash the game, it runs perfectly fine, but the red makes me worry that leaving them unresolved too long might cause problems further down the line. They also will make it harder to pick out new errors.
Any ideas on how to resolve this? Any help is appreciated. Thanks!