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

Could not find type "ConsoleCommand" in the current scope error happens sometimes on start #8

Open
nothke opened this issue Dec 11, 2023 · 3 comments

Comments

@nothke
Copy link

nothke commented Dec 11, 2023

First of, thanks for the console implementation for Godot 4. It's usable, but I'm getting an error at game startup SOMETIMES, so not on every run, and I am not exactly sure what could cause it:

Could not find type "ConsoleCommand" in the current scope

Triggered at

func add_command(command: ConsoleCommand) -> void:

line of Console.gd

I've followed your suggestion to add ConsoleMono to autoload, and turned it on in plugins.

Using Godot v4.2.1.rc1.mono.official [daeb1c729]

@4d49
Copy link
Owner

4d49 commented Dec 11, 2023

@nothke can you attach a minimal project to reproduce the problem?

@nothke
Copy link
Author

nothke commented Dec 13, 2023

I tried to make a minimal project, but I couldn't reproduce the problem.

The only other place I saw this mentioned is here, but in a different context. I tried deleting .godot as suggested there, but it did nothing, it still happens randomly at startup

Btw, I was also streaming making my game, and here is a moment the error happens: https://youtu.be/oPuhyv5TTBI?t=3919

@4d49
Copy link
Owner

4d49 commented Dec 14, 2023

@nothke i'm sorry, but I'm not sure the problem is on my side. Try removing static typing from the argument in add_command.

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