0 votes

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 onRestartButton_pressed():

$RestButton.frame = 1
yield(gettree().createtimer(0.2),"timeout")
gettree().reloadcurrent_scene()

Godot version 3.2
in Engine by (44 points)

1 Answer

0 votes

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")

?

by (628 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.