poohcom1 / godot-animated-sprite-2-player

A Godot addon to convert animated sprite frames to animations in an animation player.
https://godotengine.org/asset-library/asset/1605
MIT License
41 stars 3 forks source link

Failed to load script, compilation failed #10

Closed MrCythos closed 5 months ago

MrCythos commented 5 months ago

I'm getting an error when I try to load this plugin saying that the compilation is failing. This is the following output in the debugger.

res://addons/AS2P/InspectorConvertor.gd:1 - Parse Error: Unexpected "Identifier" in class body. res://addons/AS2P/plugin.gd:-1 - Compile Error: modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/AS2P/plugin.gd" with error "Compilation failed". (User) res://addons/AS2P/plugin.gd:9 - Invalid call. Nonexistent function 'new' in base 'GDScript'.

I'm on v4.2.1.stable.official [b09f793f5]

poohcom1 commented 5 months ago

I can't seem to reproduce the compiler error. Can you try opening up res://addons/AS2P/InspectorConvertor.gd in the script editor and send me a screenshot of the highlighted error?

MrCythos commented 5 months ago

After I opened it, it looks like for whatever reason, when I downloaded it off of godot's site, the scripts were for godot 3 despite selecting the 4.0 version. After you asked me to open up those files, the errors that popped up were things like "tool" instead of "@tool" and "yield" instead of "await". I was able to fix it by copy-pasting the code directly from the github page and replacing everything for all three .gd scripts.

image