When creating scripts and saving them, I get alot of read-back-errors from the editor. Like "Failed to read modified script". I need to save the exact same script 3-8 times until the editor can successfully read the script. It happens nearly every time, so it is pretty annoying.
Now I want to know why this is happening? What can I do to avoid such errors?
I'm using Visual Studio Code.
As I said on Discord, this is an occasional problem for me that does not seem to immediately recur, so a quick space-backspace-save resolves it.
Have you tested this with all extensions removed from VSC? It's possible that something (linter?) is delaying the file write just enough to cause problems.
I use Core Lua API (Manticore Games) and Lua, Lua language server (sumneko) only. Which might also be worth a try.
So, after some testing I want to give a little feedback on this.
I removed all unnecessary extensions and it seems to work a little better now. However, after some time the problems are recuring intensely. But I found that restarting the PC helps alot. For some hours I have lesser problems.
It's still weird, because I don't have that kind of problems with other engines and tools.
I bet this could be a caching problem or a problem with temp files, but idk.
Thanks anyway, it works a bit better now
I agree that there is some issue on the Core side, but glad it has improved a bit for you.
Bumb after 5 months - still having the same error, still hoping for help.
Here is a picture of the error:
The script itself is fine. It happens for every script very frequently.
I believe it has something to do with Visual Studio Code. I also experience that this error happens more often, the more lines of code a script has.
I can't believe that I am the only one with this bug.
Any help is greatly appreciated!
I would love if I could give the core editor more time to read back a script to see if this changes something.
Or if I could give VSC a little more time before sending the "file saved" signal, or whatever triggers the core editor to read back a script.
I also thought about trying a different text editor to see if this makes a difference. Theoretically somthing like notepad++ should be enough for a test.
I will report back with any findings.
Until then thanks again for your help!
Much appreciated @RedQuad
I've added this on the discord server Discord as I'm not sure how much visibility this forum has to Manticore.
Thank you very much, this is a great idea!