Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Support [Server] make vscode compiler rewrite actual file

 
  • 0 Vote(s) - 0 Average
Server make vscode compiler rewrite actual file
hiwyn
Offline

Burgershot Member
Posts: 22
Threads: 8
Joined: Sep 2021
Reputation: 0
#1
2022-04-23, 01:25 PM
everytime i press F5 to compile a filterscript or a gamemode
it creates the .amx, but creates where i open the vscode

i mean, if i did:
cd sampserver && code .
if i open a file MISSIONS.pwn in sampserver/gamemodes
it will generate the amx in /home/sampserver instead of /home/sampserver/gamemodes

there is a way to instead of generate the amx there it get the file path (.pwn i'm editing) and creates the amx there rewriting the actual?

its boring, every time i edit a lib or a gm or a filterscript i got to move the amx after finish




I'm compiling it on linux with this: https://github.com/pawn-lang/compiler/releases
And with this .vscode/tasks.json:

Code:
{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "type": "shell",
      "command": "/usr/bin/pawncc",
      "args": [
        "${file}",
        "\"-;+\"",
        "\"-(+\"",
        "-i\"/home/hiwyn/Documents/sampserver/include/\""
      ],
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "isBackground": false,
      "presentation": {
        "reveal": "silent",
        "clear": false,
        "panel": "dedicated"
      },
      "problemMatcher": [
        {
          "base": "$pawncc",
          "fileLocation": "relative"
        }
      ]
    }
  ]
}
hiwyn
Offline

Burgershot Member
Posts: 22
Threads: 8
Joined: Sep 2021
Reputation: 0
#2
2022-05-12, 07:35 AM (This post was last modified: 2022-05-14, 01:00 PM by hiwyn.)
just add
"'-D${fileDirname}'",
on task.json
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode