I had a problem with reloading scenes and I asked it here.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MemokingMH

Answers said you must print reload curret scene to see the error . My problem is how.Its not allowing me to print a function .

Also this is the code if u wanna know

func _on_RestartButton_pressed():
>$RestButton.frame = 1
>yield(get_tree().create_timer(0.2),“timeout”)
>get_tree().reload_current_scene()

:bust_in_silhouette: Reply From: clemens.tolboom

What about:

func onRestartButton_pressed():
    print("onRestartButton_pressed")
    $RestButton.frame = 1
    print("before timeout")
    yield(gettree().createtimer(0.2),"timeout")
    print("after timeout")
    gettree().reloadcurrent_scene()
    print("after reloadcurrent_scene")

?