Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bool return value of Tween functions not documented #29171

Closed
mitchcurtis opened this issue May 25, 2019 · 3 comments
Closed

bool return value of Tween functions not documented #29171

mitchcurtis opened this issue May 25, 2019 · 3 comments

Comments

@mitchcurtis
Copy link
Contributor

None of the functions here document the meaning of their return value:

https://docs.godotengine.org/en/3.1/classes/class_tween.html#class-tween-method-interpolate-property

@rcorre
Copy link
Contributor

rcorre commented Dec 11, 2019

I was about to report this in the godot-docs issue tracker, but after looking at the source, I think the issue is actually that the return value is used inconsistently and is not very useful.

Many Tween functions like start will always return true. A few will return false in the case where there's "no valid delta", but there are many other conditions where it will fail with an assert instead. So it sounds like the answer for most is that they "return true if they succeed, and maybe return false if they fail, but also might error out."

@Calinou
Copy link
Member

Calinou commented Apr 17, 2020

I think it would make sense to make those Tween methods return void instead of a boolean value. We can still print errors if something wrong occurs.

@Calinou Calinou added this to the 4.0 milestone Apr 17, 2020
@akien-mga
Copy link
Member

akien-mga commented Apr 17, 2020

This was fixed already by #36844.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants