'null value' when im trying to switch scenes

Im way out of my depth here :,D I saw someone say there would be another error before the one i got and i looked, it also gave me this, which i didnt see before (i didnt realize i was on the output instead of the error screen when i posted this sorry):

minigame_1.gd:75 @ _process(): Parameter “data.tree” is null.

What other code do you all need to see? Im really sorry I just didnt follow along easy haha. Theres no queue_free() called and the awaits in my code are all off before this line of code is called. the variable is changed to true in the middle of dialogue (im using dialogue manager 3 to change the variable that runs this dialogue, im not sure if thats messing it up?)

I did find that error sorry! I found it after i posted this:

E 0:01:22:563 minigame_1.gd:75 @ _process(): Parameter “data.tree” is null.
<C++ Source> scene/main/node.h:549 @ get_tree()
minigame_1.gd:75 @ _process()

Post the entire _process() function.

func _process(delta: float) -> void:
	if everything:
		first_throw()
		second_throw()
		third_throw() #none of these have awaits in them
		if Globals.cup_throwable:
			if finished_2:
				animation.play("walking 2")
				
		if story1.visible:
			if Input.is_action_just_pressed("click"):
				story1.visible = false
				throw1 = false
				mark1.visible = false
				animation.play()
				
		if story2.visible:
			if Input.is_action_just_pressed("click"):
				story2.visible = false
				throw2 = false
				mark2.visible = false
				animation.play()
				
		if Globals.cup_throwable:
			if finished_2:
				animation.play("walking 2")
				
	else:
		if story3.visible:
			if Input.is_action_just_pressed("click"):
				story3.visible = false
				throw3 = false
				mark3.visible = false
				animation.play()
				
		await animation.animation_finished
		animation.play("pause")
	if Globals.minigame1finish:
		get_tree().change_scene_to_file("res://scenes/rooms/meeting_room.tscn")
		Globals.locked = false

There is an await there though.

I didnt realize the await would affect it since after the await, other things are running (my ending dialogue) without issue, sorry. I meant theres no await as ‘theres no await that should be affecting it’ although im really sorry i didnt make that clear

You shouldn’t be using awaits… like ever.

oh

that was what the dialogue tutorial told me to do haha ill find a way to do it without awaits then?

For start, try temporarily removing this one and see if your original error persists.

okay, it now switches to the other scene without any probelms, thank you :slight_smile: