Errors with project, idk what the errors are about. Might be tilemap/tileset

Godot Version

Godot v4.3.stable.official [77dcf97d8]

Question

The problem that I’m facing is hundreds of errors when I use tile maps. I saw that tilemaps are unsupported and did what it said to fix that, then I fixed hundreds of the same error (I just needed to type the correct tile size ` and that fixed my first problem but now I’m facing other errors. I am following a tutorial. the game fully works when I run it through Godot. but I can’t test the exe because of admin stuff.

can you show the code of level_one at line 14?

1 Like

This is the level one script,
extends Node2D

var used = false

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	print_debug("lvl.1 loaded")
	



func _on_door_body_entered(body: Node2D) -> void:
	if body == $Player:
		get_tree().change_scene_to_file("res://level_two.tscn")

Line 14 is get_tree().change_scene_to_file("res://level_two.tscn")

The godot project

godot project drive folder

Does whatever tileset atlas you’ve got set on the TileMapLayer actually have tiles at the coordinates its complaining about. If you select the tileset and open it in the TileSet editor at the bottom of the screen, you can see the coordinates of tiles by hovering over them

1 Like

I don’t think so, it said “There is no tile at 20, 0” which is correct, It only goes to 19 not 20.

Can you open your level_two-scene and check if there are any missing tiles (tiles with an exclamation point)?

is this the reason?

fixing that fixed everything except this,
E 0:00:06:0212 level_one.gd:14 @ _on_door_body_entered(): Removing a CollisionObject node during a physics callback is not allowed and will cause undesired behavior. Remove with call_deferred() instead.
<C++ Source> scene/2d/physics/collision_object_2d.cpp:98 @ _notification()
level_one.gd:14 @ _on_door_body_entered()

I guess you can try this:

func _on_door_body_entered(body: Node2D) -> void:
	if body == $Player:
		get_tree().call_deferred("change_scene_to_file","res://level_two.tscn")
1 Like

what does this do differently?

It worked, thanks!

1 Like

This fixed my second problem but i set the Solution to the reply that fiex the main problem, Thanks so much

1 Like