derkork / godot-statecharts

A state charts extension for Godot 4
MIT License
761 stars 39 forks source link

Incorrect error message for an invalid transition delay #138

Closed matthewtole closed 3 weeks ago

matthewtole commented 4 weeks ago

I kept seeing this error in my project but couldn't figure out where I had an invalid boolean expression. It was only when I looked at where the error was throwing that I realized it was because I had an int value in the delay field.

https://github.com/derkork/godot-statecharts/blob/56a7498fc6dc4423b21f40528c20deef342f67e0/addons/godot_state_charts/transition.gd#L91-L92

Separate but related issue: the error messages would be more useful if they included details like the invalid value and what kind of property it's failing in.

Happy to make the changes myself, just following the rules about making an issue first.

smile-coder commented 3 weeks ago

Oh, it happened to me too, when I set the delay field to 0 instead of 0.0!

derkork commented 3 weeks ago

I had another issue roughly in the same area, so i implemented this together with the fix for the other issue. thanks for reporting it!