Компиляция кода в VS Code

Rimmer

Помогаю новичкам / Переводчик / Тестер / Заказчик
Сообщения
1,368
Реакции
753
Проблема снова....

Сейчас компилю плагин и пишет ошибку,
C-подобный:
SourcePawn Compiler 1.11.0.6931
Copyright (c) 1997-2006 ITB CompuPhase   
Copyright (c) 2004-2021 AlliedModders LLC

D:\Hentai\scripting1\achievements.sp(235) : error 017: undefined symbol "OnSaveInventory"

1 Error.

 *  Процесс терминала "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command D:/Hentai/scripting1/spcomp.exe D:\Hentai\scripting1\achievements.sp -i D:\Hentai\scripting1\achievements.sp -i "D:/Hentai/scripting1/include" -O2 -t4 -v2 -o D:/Hentai/plugins1/achievements.smx" был завершен с кодом выхода 1.
Но прикол в том что если просто перекинуть в ручную то все скомпилируется, а через task.json, не получается...
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.10",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting/include\" -O2 -t4 -v2 -o D:/Hentai/plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting1/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting1/include\" -O2 -t4 -v2 -o D:/Hentai/plugins1/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
 

Palonez

бб братки
Сообщения
3,035
Реакции
1,837
Проблема снова....

Сейчас компилю плагин и пишет ошибку,
C-подобный:
SourcePawn Compiler 1.11.0.6931
Copyright (c) 1997-2006 ITB CompuPhase  
Copyright (c) 2004-2021 AlliedModders LLC

D:\Hentai\scripting1\achievements.sp(235) : error 017: undefined symbol "OnSaveInventory"

1 Error.

 *  Процесс терминала "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command D:/Hentai/scripting1/spcomp.exe D:\Hentai\scripting1\achievements.sp -i D:\Hentai\scripting1\achievements.sp -i "D:/Hentai/scripting1/include" -O2 -t4 -v2 -o D:/Hentai/plugins1/achievements.smx" был завершен с кодом выхода 1.
Но прикол в том что если просто перекинуть в ручную то все скомпилируется, а через task.json, не получается...
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.10",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting/include\" -O2 -t4 -v2 -o D:/Hentai/plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting1/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting1/include\" -O2 -t4 -v2 -o D:/Hentai/plugins1/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
1677086157528.png

Сообщения автоматически склеены:

Проблема снова....

Сейчас компилю плагин и пишет ошибку,
C-подобный:
SourcePawn Compiler 1.11.0.6931
Copyright (c) 1997-2006 ITB CompuPhase  
Copyright (c) 2004-2021 AlliedModders LLC

D:\Hentai\scripting1\achievements.sp(235) : error 017: undefined symbol "OnSaveInventory"

1 Error.

 *  Процесс терминала "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command D:/Hentai/scripting1/spcomp.exe D:\Hentai\scripting1\achievements.sp -i D:\Hentai\scripting1\achievements.sp -i "D:/Hentai/scripting1/include" -O2 -t4 -v2 -o D:/Hentai/plugins1/achievements.smx" был завершен с кодом выхода 1.
Но прикол в том что если просто перекинуть в ручную то все скомпилируется, а через task.json, не получается...
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.10",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting/include\" -O2 -t4 -v2 -o D:/Hentai/plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting1/spcomp.exe ${file} -i ${file} -i \"D:/Hentai/scripting1/include\" -O2 -t4 -v2 -o D:/Hentai/plugins1/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
JSON:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.11",
            "type": "shell",
            "command": [
                "I:/Hard_disk_drive/LOCAL_CSGO/sourcemod3/scripting/spcomp.exe ${file} -i \"I:/Hard_disk_drive/LOCAL_CSGO/sourcemod3/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
мой вариант
 

-=|УЧЕНИК|=-

вся жизнь,сплошной цирк.
Сообщения
895
Реакции
219
Посмотреть вложение 109265
Сообщения автоматически склеены:


JSON:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.11",
            "type": "shell",
            "command": [
                "I:/Hard_disk_drive/LOCAL_CSGO/sourcemod3/scripting/spcomp.exe ${file} -i \"I:/Hard_disk_drive/LOCAL_CSGO/sourcemod3/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
мой вариант
А как сделать,если допустим 3 компилятора?
SM 1.9
SM 1.10
SM 1.11
Просто копировать готовый вариант и вставлять с новой строчки?
Я просто не пробовал,решил изначально поинтересоваться)
А то бось что-то сбить
 

Nekro

Терра инкогнита
Сообщения
4,042
Реакции
2,295
А как сделать,если допустим 3 компилятора?
SM 1.9
SM 1.10
SM 1.11
Просто копировать готовый вариант и вставлять с новой строчки?
Я просто не пробовал,решил изначально поинтересоваться)
А то бось что-то сбить
Тоже стало интересно, вот как у меня получилось

C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.9.0-git6281",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6522-css_v34",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6927",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
 

Вложения

  • tasks.json
    3.8 КБ · Просмотры: 12

Rimmer

Помогаю новичкам / Переводчик / Тестер / Заказчик
Сообщения
1,368
Реакции
753
А как сделать,если допустим 3 компилятора?
SM 1.9
SM 1.10
SM 1.11
Просто копировать готовый вариант и вставлять с новой строчки?
Я просто не пробовал,решил изначально поинтересоваться)
А то бось что-то сбить
Естественно можно, вот у меня SM 1.10 и SM 1.11
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.10",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting/spcomp.exe ${file} -i \"D:/Hentai/scripting/include\" -O2 -t4 -v2 -o D:/Hentai/plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting1/spcomp.exe ${file} -i \"D:/Hentai/scripting1/include\" -O2 -t4 -v2 -o D:/Hentai/plugins1/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
Когда нажимаешь кнопку компиляции тебе выходит меню, и спрашивает какой использовать:
1677140490009.png
 

-=|УЧЕНИК|=-

вся жизнь,сплошной цирк.
Сообщения
895
Реакции
219
Ну просто указываете пути к разным компиляторам
Ну это понятно.
Просто не знал как правильно сделать.
Благодарю
Сообщения автоматически склеены:

Естественно можно, вот у меня SM 1.10 и SM 1.11
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.10",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting/spcomp.exe ${file} -i \"D:/Hentai/scripting/include\" -O2 -t4 -v2 -o D:/Hentai/plugins/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11",    // Ќазвание в выпадающем меню
            "type": "shell",
            "command": [
               "D:/Hentai/scripting1/spcomp.exe ${file} -i \"D:/Hentai/scripting1/include\" -O2 -t4 -v2 -o D:/Hentai/plugins1/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // ќпредел¤ет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
Когда нажимаешь кнопку компиляции тебе выходит меню, и спрашивает какой использовать:
Посмотреть вложение 109299
А я не так копировал просто)
Вижу что что-то не так)
Думаю надо лучше спросить.
Щас вижу как правильно надо)
 

iLoco

Пишу плагины за печеньки 🍪🍪🍪
Сообщения
2,265
Реакции
1,323
Тоже стало интересно, вот как у меня получилось

C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.9.0-git6281",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6522-css_v34",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6927",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
Можно ещё извращится через input
пример файла:

JSON:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Sourcemod",
            "type": "shell",
            "command": [
                    "D:/@me/sourcemod/compiller_${input:sourcemod_version}/spcomp.exe '${file}' -i 'D:/@me/sourcemod/include/' -O2 -t4 -v2 -o '${fileDirname}/${fileBasenameNoExtension}'"
                    ],
            "group": {
                "kind": "build",
            },
            "presentation": {
                "reveal": "never",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "group": "sourcemod",
                "focus": true,
            },
            "problemMatcher": "$msCompile"
        }
    ],
    "inputs": [
        {
            "description": "Выберите версию",
            "id": "sourcemod_version",
            "type": "pickString",
            "options": [
                "1.10",
                "1.11",
                "1.12",
            ]
        }
    ]
}

1677146227396.png
1677146304324.png
 

Nekro

Терра инкогнита
Сообщения
4,042
Реакции
2,295
Можно ещё извращится через input
пример файла:

JSON:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Sourcemod",
            "type": "shell",
            "command": [
                    "D:/@me/sourcemod/compiller_${input:sourcemod_version}/spcomp.exe '${file}' -i 'D:/@me/sourcemod/include/' -O2 -t4 -v2 -o '${fileDirname}/${fileBasenameNoExtension}'"
                    ],
            "group": {
                "kind": "build",
            },
            "presentation": {
                "reveal": "never",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "group": "sourcemod",
                "focus": true,
            },
            "problemMatcher": "$msCompile"
        }
    ],
    "inputs": [
        {
            "description": "Выберите версию",
            "id": "sourcemod_version",
            "type": "pickString",
            "options": [
                "1.10",
                "1.11",
                "1.12",
            ]
        }
    ]
}

Посмотреть вложение 109304 Посмотреть вложение 109306
Обнаружена неопределенная входная переменная "sourcemod_version". Чтобы продолжить, удалите или определите "sourcemod_version".

А что то надо включать, да бы это вообще работало?
Сообщения автоматически склеены:

Тоже стало интересно, вот как у меня получилось

C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.9.0-git6281",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6522-css_v34",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6522-css_v34-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "SM 1.11.0-git6927",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.11.0-git6927-linux/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                // Пример: "C:/Users/admin/Desktop/scripting/spcomp.exe ${file} -i \"C:/Users/admin/Desktop/scripting/include\" -O2 -t4 -v2 --o \"${fileDirname}\\${fileBasenameNoExtension}\""
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
Если беру эту рабочую версию, то выдаёт это VS Code VS .sp открыть файл

А вот так всё работает:
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "SM 1.9.0-git6281",    // Название в выпадающем меню
            "type": "shell",
            "command": [
                "F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i 'F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include' -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",  // Определяет то, как будет показан терминал. always - всегда будет показан, never - никогда не будет показан, silent - показан только если есть ерроры
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "focus": true
            },
            "problemMatcher": "$msCompile"
        }
    ]
}
Сообщения автоматически склеены:

Блока должно быть не более одного иначе ошибка по ссылке
 
Последнее редактирование:

iLoco

Пишу плагины за печеньки 🍪🍪🍪
Сообщения
2,265
Реакции
1,323
Обнаружена неопределенная входная переменная "sourcemod_version". Чтобы продолжить, удалите или определите "sourcemod_version".

А что то надо включать, да бы это вообще работало?
да, там видно если в поиск вбить sourcemod_version находять в файле
 

Вложения

  • 1679064748070.png
    1679064748070.png
    3.5 КБ · Просмотры: 27

Nekro

Терра инкогнита
Сообщения
4,042
Реакции
2,295
да, там видно если в поиск вбить sourcemod_version находять в файле
Так а ошибка где?
Сообщения автоматически склеены:

да, там видно если в поиск вбить sourcemod_version находять в файле
Беру ваш код
JSON:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Sourcemod",
            "type": "shell",
            "command": [
                    "D:/@me/sourcemod/compiller_${input:sourcemod_version}/spcomp.exe '${file}' -i 'D:/@me/sourcemod/include/' -O2 -t4 -v2 -o '${fileDirname}/${fileBasenameNoExtension}'"
                    ],
            "group": {
                "kind": "build",
            },
            "presentation": {
                "reveal": "never",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "group": "sourcemod",
                "focus": true,
            },
            "problemMatcher": "$msCompile"
        }
    ],
    "inputs": [
        {
            "description": "Выберите версию",
            "id": "sourcemod_version",
            "type": "pickString",
            "options": [
                "1.10",
                "1.11",
                "1.12",
            ]
        }
    ]
}
И выдаёт, что переменная не определена sourcemod_version
 

Nekro

Терра инкогнита
Сообщения
4,042
Реакции
2,295
@iLoco, Есть идеи?
CSS:
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Info  - 08:52:38] Connection to server got closed. Server will restart.
Starting SourcePawn server version 0.9.7
Received config [Object {"disableSyntaxLinter": Bool(false), "includesDirectories": Array [String("F:\\sm\\sourcemod-1.9.0-git6281-windows\\addons\\sourcemod\\scripting\\include")], "linterArguments": Array [], "mainPath": String(""), "spcompPath": String("F:\\sm\\sourcemod-1.9.0-git6281-windows\\addons\\sourcemod\\scripting\\spcomp.exe")}]
thread 'main' panicked at 'Main Path does not exist.', src\server\files.rs:113:49
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 08:52:38] The SourcePawn Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Сообщения автоматически склеены:

В общем переустанавливал что только можно, гуглил, менял настройки и на какой то раз эти настройки просто начали работать..
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Sourcemod",
            "type": "shell",
            "command": [
                    "F:/sm/${input:sourcemod_version}/addons/sourcemod/scripting/spcomp.exe '${file}' -i 'F:/sm/${input:sourcemod_version}/addons/sourcemod/scripting/include/' -O2 -t4 -v2 -o '${fileDirname}/${fileBasenameNoExtension}'"
                    //"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                ],
            "group": {
                "kind": "build",
            },
            "presentation": {
                "reveal": "never",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "group": "sourcemod",
                "focus": true,
            },
            "problemMatcher": "$msCompile"
        }
    ],
    "inputs": [
        {
            "description": "Выберите версию",
            "id": "sourcemod_version",
            "type": "pickString",
            "options": [
                "sourcemod-1.9.0-git6281-windows",
                "sourcemod-1.11.0-git6522-css_v34-linux",
                "sourcemod-1.11.0-git6927-linux",
            ]
        }
    ]
}
 
Последнее редактирование:

iLoco

Пишу плагины за печеньки 🍪🍪🍪
Сообщения
2,265
Реакции
1,323
@iLoco, Есть идеи?
CSS:
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Info  - 08:52:38] Connection to server got closed. Server will restart.
Starting SourcePawn server version 0.9.7
Received config [Object {"disableSyntaxLinter": Bool(false), "includesDirectories": Array [String("F:\\sm\\sourcemod-1.9.0-git6281-windows\\addons\\sourcemod\\scripting\\include")], "linterArguments": Array [], "mainPath": String(""), "spcompPath": String("F:\\sm\\sourcemod-1.9.0-git6281-windows\\addons\\sourcemod\\scripting\\spcomp.exe")}]
thread 'main' panicked at 'Main Path does not exist.', src\server\files.rs:113:49
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 08:52:38] The SourcePawn Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Сообщения автоматически склеены:

В общем переустанавливал что только можно, гуглил, менял настройки и на какой то раз эти настройки просто начали работать..
C-подобный:
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Sourcemod",
            "type": "shell",
            "command": [
                    "F:/sm/${input:sourcemod_version}/addons/sourcemod/scripting/spcomp.exe '${file}' -i 'F:/sm/${input:sourcemod_version}/addons/sourcemod/scripting/include/' -O2 -t4 -v2 -o '${fileDirname}/${fileBasenameNoExtension}'"
                    //"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/spcomp.exe ${file} -i \"F:/sm/sourcemod-1.9.0-git6281-windows/addons/sourcemod/scripting/include\" -O2 -t4 -v2 -o ${fileDirname}/../scripting/compiled/${fileBasenameNoExtension}.smx"
                ],
            "group": {
                "kind": "build",
            },
            "presentation": {
                "reveal": "never",
                "echo": false,
                "showReuseMessage": false,
                "clear": true,
                "group": "sourcemod",
                "focus": true,
            },
            "problemMatcher": "$msCompile"
        }
    ],
    "inputs": [
        {
            "description": "Выберите версию",
            "id": "sourcemod_version",
            "type": "pickString",
            "options": [
                "sourcemod-1.9.0-git6281-windows",
                "sourcemod-1.11.0-git6522-css_v34-linux",
                "sourcemod-1.11.0-git6927-linux",
            ]
        }
    ]
}
Да, тоже час назад столкнулся, я откатился на версию 4.2.4, на ней всё прекрасно компилирует через это-же расширение. Я от VS Code Tasks отказался, меня не устраивает компиляция 5-10 секунд.
 

Вложения

  • 1680440065789.png
    1680440065789.png
    3.8 КБ · Просмотры: 62
  • 1680440083672.png
    1680440083672.png
    8.8 КБ · Просмотры: 50
  • 1680440099499.png
    1680440099499.png
    6.1 КБ · Просмотры: 65

Nekro

Терра инкогнита
Сообщения
4,042
Реакции
2,295
Может кто подскажет, столкнулся буквально вчера с такой проблемой

Screenshot_275.png


Использую расширение SourcePawn Studio, до вчерашнего дня всё было хорошо. Переустановка не помогла
 
Сверху Снизу