Giter VIP home page Giter VIP logo

Comments (5)

Southclaws avatar Southclaws commented on May 30, 2024 2

Going to re-open this as it's still an issue I need to solve on my end. Either by modifying package.json to not include an explicit gamemodes/ subdirectory or by updating the documentation to be more specific about how vscode and pawncc use paths.

from vscode-pawn.

Southclaws avatar Southclaws commented on May 30, 2024

To answer the first question, the output tab was never used - this is only for extension output, not task output. This may be the case in future when sampctl is integrated into the extension but for now, tasks.json is the only way and thus problems/terminal are the only outputs.

The next problem is tricky because vscode doesn't support absolute and relative paths in the same output. There's an open issue on the compiler: pawn-lang/compiler#247 to resolve this. sampctl already resolves this by outputting warnings and errors with full paths.

Now the actual issue you're encountering may be slightly different, it seems like the relative jump is going from the wrong path. The default pattern already includes a gamemodes folder, I may remove this as it's based on an assumption.

Now, to resolve your issue you could simply replace the "problemMatcher": "$pawncc" line with:

            "problemMatcher": {
                "name": "pawncc",
                "owner": "pawn",
                "fileLocation": ["relative", "${workspaceRoot}"],
                "pattern": {
                    "regexp":
                        "^(.*?)\\(([0-9]*)[- 0-9]*\\) \\: (fatal error|error|warning) [0-9]*\\: (.*)$",
                    "file": 1,
                    "location": 2,
                    "severity": 3,
                    "message": 4
                }
            }

And then you have the freedom to mess with the fileLocation yourself and find what works based on your setup.

from vscode-pawn.

MichaelBelgium avatar MichaelBelgium commented on May 30, 2024

To answer the first question, the output tab was never used - this is only for extension output, not task output. This may be the case in future when sampctl is integrated into the extension but for now, tasks.json is the only way and thus problems/terminal are the only outputs.

Alright, nvm then. I guess I've been mistaken (or just saw it somewhere else)

About the relative issue, the piece of code actually made it work (thx for that). Although it does say Property name is not allowed which refers to "name": "pawncc",

from vscode-pawn.

Southclaws avatar Southclaws commented on May 30, 2024

Oh yeah I think the name property is only valid in the package.json declaration, feel free to omit it in your tasks.json file, it'll make no difference.

from vscode-pawn.

MichaelBelgium avatar MichaelBelgium commented on May 30, 2024

Alright, great 😃

from vscode-pawn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.