gdquest-demos / godot-3-demos

Dozens of free and open source demos for the Godot game engine, version 3. Head to the link below for newer demos for Godot 4+
https://github.com/gdquest-demos/
MIT License
1.85k stars 978 forks source link

Astar demo doesn't run #26

Closed menip closed 6 years ago

menip commented 6 years ago

May simply be issue with current Godot master, but putting here just in case. Editor gives error at line 114 of pathfind_aster.gd:

Parser Error: Function signature doesn't match the parent. Parent signature is: 'NodePath get_path()'

Replacing occurrences of get_path() with get_path_thing() resolves error and project runs fine.

NathanLovato commented 6 years ago

Godot 3.1 isn't out yet. Yes it does work in the stable release

AntiGoblin commented 5 years ago

Replacing occurrences of get_path() with get_path_thing() resolves error and project runs fine.

I've done this and run into a new error.

Parser Error: Identifier 'IDLE' is not defined in the current scope.

NathanLovato commented 5 years ago

The demos are for Godot 3.0, not Godot 3.1. If you want to port it to Godot 3.1, PRs are welcome. To fix this error you've got to access the enums' members explicitly:


enum EnumName {IDLE, WALK, ...}

EnumName.IDLE```