bitbrain / beehave

🐝 behavior tree AI for Godot Engine
https://bitbra.in/beehave
MIT License
1.98k stars 122 forks source link

Mybe is a bug,when open the Beehave panel it will break #351

Closed DataOod closed 1 month ago

DataOod commented 3 months ago

Godot version: 4.2.2

When open the Beehave tree panel it break. if don't , tree will run fine but open the debug panel .when tree are going run next composite it break. don't know dose is a bug.

10 11 12 13

DataOod commented 3 months ago

Soryy,I don't know why it now running fine and not break anymore.

dagrooms52 commented 2 months ago

I'm getting the same error. It only appears when running the beehave debugger, the game continues working without errors if I don't open the debug panel.

dagrooms52 commented 2 months ago

This was caused by an ActionLeaf extension script not returning any result; I added return SUCCESS which fixed the bug.

There was no warning in the engine for lack of a return value. This could be fixed by adding the type hint -> int to the tick(_1, _2) override. This is present in the template function but is not copied by Godot by default. To enable this, check add type hints in editor settings > completion.

To locate the broken script in a large tree, you can delete higher branches iteratively and see if the issue continues to repro.

bitbrain commented 2 months ago

@dagrooms52 can you confirm that this was indeed user error or can you observe this as a bug from the addon itself?

dagrooms52 commented 2 months ago

It's a user error.

The error itself is somewhat hidden, there is no warning that the overridden function isn't returning a required value using default Godot settings, but that is a problem with the engine settings not the plugin.