Pawn compiler
Write or paste a SA-MP or open.mp script and compile it here, with the same compiler sampctl and open.mp use. Mistakes are shown on their lines and explained, and brackets and indentation are checked as you type.
Loading the editor
Compiler
Press Compile to check the script with the real compiler. Its errors and warnings show here and on their lines.
Live checks
Brackets and strings
✓ Every bracket, string and comment is closed.
Indentation
✓ The indentation follows the braces.
Includes
Compiled with the SA-MP 0.3.7 includes. Chosen by the script: open.mp’s when it includes <open.mp>.
Includes and options
Libraries that come with the page
Include any of them as you would on a PC; those not included are left out.
- sscanf 2.15.1
- Streamer 2.9.6
- Pawn.CMD 3.4.0
- zcmd 0.3.1
- MySQL plugin R41-4
- samp-bcrypt 0.4.1
- Pawn.Regex 1.2.3
- Pawn.RakNet 1.6.1
- foreach 19.0
<Pawn.CMD> <Pawn.RakNet> <Pawn.Regex> <a_mysql> <foreach> <samp_bcrypt> <sscanf2> <streamer> <zcmd>
Add a library from GitHub
Your browser downloads its include files from GitHub, with the libraries its pawn.json depends on, and keeps them here for next time. Add :tag or #commit for a given version.
Your own include files
Add .inc files, or a whole folder such as pawno/include. They are read here and never uploaded, and a file of yours takes the place of the page’s file of the same name.
The command line it runs
Pawn compiler 3.10.10, running in your browser. Nothing is uploaded: your scripts are kept in this browser only.
About this compiler
- This is the real Pawn compiler: version 3.10.10 of the community’s pawn-lang compiler, the one sampctl and open.mp use. It is built to run in your browser, and makes the same .amx it makes on a PC.
- Nothing you write is uploaded. Scripts are compiled on your own device and kept in this browser only; libraries you add are downloaded by your browser straight from GitHub.
- The SA-MP 0.3.7 and open.mp includes come with it, and so do sscanf, Streamer, Pawn.CMD, zcmd, MySQL, bcrypt, Pawn.Regex, Pawn.RakNet and foreach. Include what you need as you would on a PC.
- Other libraries, YSI among them, are added from GitHub with what they depend on, as sampctl does it. Your own include files, or a whole pawno include folder, can be added too.
- The live checks run as you type: brackets, strings and comments left open, and indentation that is off. Format re-indents the whole file by its braces, and each compiler message is explained in plain words.
- Includes written for Windows, with backslashes in their paths, work as they do in pawno. Text in strings is saved in the code page you choose, so Russian or Turkish text shows in the game as written.
Credits and licences
The compiler and every include here are the work of their authors, used under their licences:
- Pawn compiler 3.10.10 · ITB CompuPhase, pawn-lang · zLibBuilt for WebAssembly by samp.directory from its unchanged source, with a small layer of our own for the browser.
- SA-MP 0.3.7 includes 0.3.7-R2-2-1 · SA-MP Team · given out with the SA-MP server for scripting it
- Pawn standard library · ITB CompuPhase, pawn-lang · zLib (Pawn)
- open.mp includes · open.mp team · MPL-2.0
- sscanf 2.15.1 · Y_Less · MPL-1.1
- Streamer 2.9.6 · Incognito · Apache-2.0
- Pawn.CMD 3.4.0 · katursis · MIT
- zcmd 0.3.1 · ZeeX · MIT
- MySQL plugin R41-4 · BlueG, maddinat0r · BSD-3-Clause
- samp-bcrypt 0.4.1 · Sreyas-Sreelal · MIT
- Pawn.Regex 1.2.3 · katursis · MIT
- Pawn.RakNet 1.6.1 · katursis · MIT
- foreach 19.0 · Y_Less, Open-GTO · MPL-1.1
- CodeMirror · Marijn Haverbeke · MITThe editor.