Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser Error: Could not find type "ProtonScatterBaseShape" in the current scope. #173

Open
BalJoseph opened this issue Nov 9, 2023 · 3 comments

Comments

@BalJoseph
Copy link

When I try to run my project I (inconsistently) encounter this error.

I have not been able to recreate this error consistently, when I do encounter the error and I restart the project the error does not reappear again for quite some time.

I would appreciate any information on what could be causing this error and how I should go about resolving it.

Thanks

@Eole211
Copy link

Eole211 commented Dec 4, 2023

I sometimes get the same error, can't recreate it consistently either.
I'm using the .NET version of Godot 4.2, with ProtonScatter 4.0

@Eole211
Copy link

Eole211 commented Dec 19, 2023

It seems to be more of a godot problem than a protonscatter problem : https://duckduckgo.com/?t=h_&q=godot+Parser+Error%3A+Could+not+find+type+in+the+current+scope.&ia=web

The error does not happen when running the project from godot CLI or when running/debugging with vs code and the godot .net tools extension, so that's what I'm doing now to stay sane @BalJoseph

PS : if you use C#, you'll need to build the .net project with dotnet build before launching it with the CLI, otherwise you won't see your changes

@Eole211
Copy link

Eole211 commented Jan 11, 2024

Well in fact it still happens when launching from vs code or CLI, but in vs code it just ignores the error and keep running the game without protonscatter...

This bug is really weird.. It seems ProtonScatterBaseShape is not loaded when it should be. If you add this line : const ProtonScatterBaseShape := preload('./shapes/base_shape.gd') at the beginning of scatter_shape.gd, the error doesn't happen here, but it can still happen later, when parsing path_shape.gd : Parser Error: Could not find base class "ProtonScatterBaseShape".

Like I said earlier : It seems to be more of a godot bug than a ProtonScatter bug. The hard part is reproducing it : it's happening regularly in my huge game project, but in the scatter demo scene or in other smaller projects it never does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants