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

Provide unnecessary error for undeclaredSymbol #1739

Open
YangJun404 opened this issue Jan 31, 2025 · 5 comments
Open

Provide unnecessary error for undeclaredSymbol #1739

YangJun404 opened this issue Jan 31, 2025 · 5 comments

Comments

@YangJun404
Copy link

The extension will provide me with the following error:

Image

Image

@Kesuaheli
Copy link

Cannot find function

Assuming the given function exists in the open workspace and is spelled correctly, does it work after you revisit (and maybe resave the file) the specified close_ui function and then make a change in the tick function with the warning?


Cannot find team

Do you have a function anywhere in your workspace that contains the command to create this debug team?

If so, do similar steps as in the function-warning:
Revisit the function that creates the team, and make a change with the function with the warning.

@YangJun404
Copy link
Author

YangJun404 commented Jan 31, 2025

The problem with "Cannot find function" occurs after I use the cp command to restore my data pack in the backup. For newly created functions, the plugin can automatically complete them. But it only completes those newly created files. As shown in the figure below:

Image

For the problem of not being able to find the team, it returned to normal after I rewritten the corresponding commands.

In the face of these two problems, I found that just opening the file (and trying to save it) could not solve the problem.


Moreover, all the old scoreboard also produce errors. They can read the new scoreboard as well, as shown in the following figure:

Image

Image

This is my log.:https://logpaste.com/68TECEqR


This problem also occurs when I open other people's data packs locally, and the plugin cannot parse the corresponding data packet version when the plugin reports an error (I don't know if this is the same problem). As shown in the figure below:

Image

Image

However, when I submitted the evaluation. The plugin has been initialized for a long time. This is a situation I haven't encountered before.
This is my local log.:https://logpaste.com/WOnE0DoH

@YangJun404
Copy link
Author

Because I don't know much about computers, I may miss information and not submit it. But I will cooperate as much as possible.

@misode
Copy link
Member

misode commented Feb 6, 2025

There's a lot of information to unpack here.

Your second to last screenshot shows an error message Unknown function ... mcfunction(command.function.unknown). This is not an error from Spyglass. You mush have another extension installed that may not be updated correctly. I suggest uninstalling that. You should only need Spyglass and syntax-mcfunction.

All the other screenshots show the "Remote SSH" indicator in the bottom left. I suspect that is the cause of the problem. This is related to #1243 but not exactly, so could be kept open if you confirm that this is actually the underlying issue.

@YangJun404
Copy link
Author

There is no problem after deleting the "mcfunction" extension locally. I'm very grateful for this because it has bothered me for a long time.

Image

It still doesn't work on the remote host, and I don't think this has something to do with #1243, because there is no problem with /give command, but I It is thought that it does not recognize the old created file.
Annoyingly, I cannot fully restore this issue. Even if I use the same operations to recover the backup, it always ends up like this: the old files created before the backup recovery cannot be recognized, while the files created after that are fine.

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

No branches or pull requests

3 participants