defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Descriptive error message for animate easing #2564

Open saberprivateer opened 5 years ago

saberprivateer commented 5 years ago

Error message in gui.animate of "invalid easing constant". This does not provide enough information as to how to make it valid.

matgis-king commented 5 years ago

Are you using the EASING_-prefixed constants from the go module? Refer to the API documentation for a complete list.

saberprivateer commented 5 years ago

I was using the easing_* prefixed constants though it was in located in the wrong parameter slot since I was following the go.animate() format rather than gui.animate(). My mistake for sure and found the answer after reading through the docs.

I was thinking that the error message could be more descriptive to something like, "Invalid easing constant. 300 found. Expecting EASING_* or custom vmath.vector" This would account for the case of adding/removing an extra parameter to provide more context for these situations. Especially since a "constant" can sound like a integer if you aren't familiar with easing. I realize there is a balance between documentation and error messages.