That's not an error, but a warning (as indicated by the W in the beginning, shown as a yellow dot in the debugger, errors are red). There are cases where it can be acceptable to ignore a warning, granted you know what you're doing. You can even disable warnings in the project settings altogether if you want.
In your case, the warning Informs you about the fact that the change_scene
-method returns a value but you don't use it. Which might be because you forgot about it. Or because the returned value isn't needed anymore, in which case you might change the function. However, change_scene
is a built-in function, so the latter is not an option. So you either can choose to ignore the warning or deal with it properly:
var error = get_tree().change_scene("<PathToNextScene>")
if error:
print("Couldn't change scene, error code: %d" % error)
Your error handling might differ of course, printing the error just acts as an example here.