Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
147 stars 23 forks source link

The current file is not a SourcePawn script. #408

Closed ZBzibing closed 3 months ago

ZBzibing commented 4 months ago

Basic informations

Compile file: The current file is not a SourcePawn script.

maxijabase commented 4 months ago

This happens when you freshly open VSCode and the program hasn't realized you're actually stepping on a SourcePawn file. Selecting a couple files back and forth fixes the issue, that is, if you're actually on a valid .sp file. The extension should not do this actually, we should find a way to force it to select an open document if there's one already opened.

ZBzibing commented 4 months ago

I don't know why this is happening, at least it wasn't before he updated it, I've completed hundreds of SPs with him, and many more excellent SP author docs that won't compile, all I want to do now is uninstall it and find the previous version to use!

ZBzibing commented 4 months ago

Solution. Upgrade the compiler to sourcemod-1.11.0-git6952

Sarrus1 commented 4 months ago

I thanks for reporting this. I don't think updating the compiler is the fix you are looking for.

ZBzibing commented 4 months ago

You can try using a lower version of 1.11, which will still report errors And I upgraded just by replacing the 3 exe files with the latest version

Spyro-Dragon commented 4 months ago

Ive gotten this issue before. What fixed it for me is unchecking "Main Path Compilation"

Sarrus1 commented 3 months ago

Closing this by making the error message detail which file is trying to be compiled. This should point the user in the right direction. Feel free to reopen to discuss this further.