PDA

View Full Version : Visual Studio Code Compiler not compiling


Ejected
09/05/2019, 01:18 PM
Is there a way to make it so that the compiler compiles the file into the folder that the .pwn is in?

Right now I have to keep editing my tasks.json depending on if I'm working on something in my /gamemodes/ folder or /filterscripts/ folder.

So if I compile something with this:

{
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["'${fileBasename}'", "'-Dfilterscripts'", "'-;+'", "'-(+'", "'-d3'"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": "$pawncc"
}
]
}

It's saving in the filterscripts folder no matter what. Even if the .pwn is in my gamemodes folder.

Is there a way to make it automatically save to where ever the .pwn file being compiled is?

polygxn
09/05/2019, 01:26 PM
{
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["'${fileBasename}'", "'-Dgamemodes'", "'-;+'", "'-(+'", "'-d3'"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": "$pawncc"
}
]
}

Try with this one. Never seen something like this tho, I had issues with compiling but I always got some kind of error back. If the attached tasks.json is not working make sure you remove the apostrophes from the "args" line around each argument.

Ejected
09/05/2019, 01:28 PM
{
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["'${fileBasename}'", "'-Dgamemodes'", "'-;+'", "'-(+'", "'-d3'"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": "$pawncc"
}
]
}

Try with this one. Never seen something like this tho, I had issues with compiling but I always got some kind of error back. If the attached tasks.json is not working make sure you remove the apostrophes from the "args" line around each argument.

Sorry it is working, but I'm getting the .amx in the wrong folder. I updated my thread, can you help with that?

TheToretto
09/05/2019, 02:18 PM
Sorry it is working, but I'm getting the .amx in the wrong folder. I updated my thread, can you help with that?

Change `"'-Dgamemodes'"` into `"'-Dfilterscripts'"` (Filterscripts was your first directory from what I've seen)

Ejected
10/05/2019, 09:46 PM
Change `"'-Dgamemodes'"` into `"'-Dfilterscripts'"` (Filterscripts was your first directory from what I've seen)

u never read questions do you

Plastikmensch
10/05/2019, 10:09 PM
Try {
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["'${fileBasename}'", "'-D${fileDirname}'", "'-;+'", "'-(+'", "'-d3'"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": "$pawncc"
}
]
}
${fileDirname} gets the directory the file is in

Ejected
10/05/2019, 10:26 PM
Try {
"version": "2.0.0",
"tasks": [
{
"label": "build-normal",
"type": "shell",
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["'${fileBasename}'", "'-D${fileDirname}'", "'-;+'", "'-(+'", "'-d3'"],
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": false,
"presentation": {
"reveal": "silent",
"panel": "dedicated"
},
"problemMatcher": "$pawncc"
}
]
}
${fileDirname} gets the directory the file is in

Thank you. Repped you