0 votes

i have a func here that will be call with x being the root node

for i in range(0 , x.get_child_count()) :
    var a = x.get_child(i)
    if a.get_child_count() != 0 :
        cleanup(a)
    if a.get_script() != null :
        var b = a.get_script().duplicate()
        a.set_script(b)

but when ever i call it the program just stop debugging, if i try replace x with a lower tier node it will crash but doesnt stop the debug but will give

 Resource file not found: res://.

this error. this function is place in the root node script and . Any help would be great

Godot version steam"s latest version
in Engine by (40 points)

Please log in or register to answer this question.

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.