Jump to content

Adaptam Visual Studio Code pentru PAWN


khain.dev

Recommended Posts

Va salut dragi utilizatori, am observat ca pe acest forum, nu este nici un tutorial, cum sa adaptezi Visual Studio Code pentru limbajul de programare pawn, si, am decis sa va arat eu....hai la treaba!

Accesam https://code.visualstudio.com/ pentru a descarca redactorul Visual Studio Code

Screenshot_20.thumb.png.0adce41e1f2257b9bfc0c0125b3077c9.png

Apasam "Download for Windows" daca aveti platforma Windows, daca nu, apasati "Other platforms" pentru a alege platforma pe care o folositi.

Dupa ce a fost instalat acest redactor, il deschidem..

Screenshot_21.thumb.png.cc7702f3df9f841505e9b3ce3d35246a.png

Avem nevoie sa deschidem extensiile acestui redactor, in poza de mai sus, este indicat cu rosu, unde trebuie sa dai click.

In aceasta extensie, dam la cautare, si scriem "Pawn Tools"

Screenshot_22.thumb.png.3bbfe50eeb4de2310f021347cc099d0d.png

Dupa ce a am gasit aceasta extensie, dam click pe ea, dupa care, pe "Install"

Screenshot_23.thumb.png.addd7812b2ebd29eccebf6d4698942bc.png

 

Acum, deschidem folderul cu serverul nostru, respectiv, deschidem catalogul "File", dupa care "Open Folder"

Screenshot_24.thumb.png.36cb6dc6f54443069a6b8b6d20c9668a.png

 

Dupa ce ai deschis folderul cu serverul tau, avem nevoie sa creem un folder cu numele de ".vscode", in acest folder creem un fisier sub numele de "tasks.json"

Screenshot_26.thumb.png.b6d50731b95acbed13b2873b63a52581.pngScreenshot_27.thumb.png.d42eb9cd7a530f71a7679f61568a56c7.png

 

Acum revenim la extensii, deschidem extensia "Pawn Tools", gasim in extensie "Command Prompt (cmd.exe)" si copiem codul din el.

Screenshot_28.thumb.png.2a58fe6edefacee3cf9ab65989c2031c.png

 

Revenim la folderul cu serverul nostru, deschidem folderul ".vscode" dupa care, deschidem fisierul "tasks.json" si punem codul copiat in fisierul respectiv, dupa care salvam

( CTRL + S )

Screenshot_29.thumb.png.01726461a66554bd1d709bda45bc2686.png
 

Acest cod e compilatorul pawn, fara el nu puteti compila gm-ul personal.

Ca sa creem butonul de compilare, avem nevoie sa dam click "Manage"

Screenshot_30.thumb.png.f0fd5cb8167db1507add34708150bb7c.png

 

Dupa, alege "Keyboard Shortcuts"

Screenshot_31.thumb.png.27855e37c7429c86885d32ea9a039c7d.png

In casuta afisata, cautam "build"

 

 

 

Screenshot_32.thumb.png.b10fbb218200052b78f79619d624e3e2.png

Redactam fisierul "Run Build Task", in casuta afisana va spune sa alegeti combinatia de butoane pentru compilarea codului

Screenshot_34.thumb.png.eb7eb00a1e52db577506cab14aaae8f2.png

Dupa care apasam enter, si cu asta noi am finisat acest tutorial, sper ca a fost de folos! Spor la treaba! 
* daca apar ceva probleme, scrie un comentariu in acest topic si te ajut.

 

  • Like 1
  • Upvote 2
Link to comment
Share on other sites

  • 7 months later...
  • 4 months later...

Imi apare problema asta, vreo rezolvare? 

 

Quote

> Executing task: 'D:\Proiecte\samp\server 1/pawno/pawncc.exe' 'd:\Proiecte\samp\server 1\gamemodes\gamemode.pwn' --% -Dgamemodes -;+ -(+ -d3 <

/usr/bin/bash: -c: line 0: syntax error near unexpected token `('
/usr/bin/bash: -c: line 0: `'D:\Proiecte\samp\server 1/pawno/pawncc.exe' 'd:\Proiecte\samp\server 1\gamemodes\gamemode.pwn' --% -Dgamemodes -;+ -(+ -d3'
The terminal process "C:\Program Files\Git\bin\bash.exe '--login', '-c', ''D:\Proiecte\samp\server 1/pawno/pawncc.exe' 'd:\Proiecte\samp\server 1\gamemodes\gamemode.pwn' --% -Dgamemodes -;+ -(+ -d3'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

 

Link to comment
Share on other sites

  • 9 months later...
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.