AMXX Compiling is the process of converting a .sma file into .amxx, or more precisely, converting AMXX code into an AMXX plugin. The term "local compiling" refers to compiling the plugin using the compiler on your computer, specifically the one in your server's directory (compile.exe).
Why is it recommended to compile plugins in this way?
I strongly recommend compiling all your plugins in this way because if you use online compilers or ones outside your server's directory, you may encounter issues:
If the compiler version is older than your AMXX version, the plugin won't run and will produce errors like "invalid plugin version" and "bad load."
Most online compilers don't support adding custom libraries (.inc files), so if your plugin uses them, you won't be able to compile it or it might compile but won't work.
If you add a compiled .amxx file to your server, you won't know what's inside it, increasing the risk of someone sending you a plugin with "backdoors," leading to server compromise. Additionally, the plugin might be compiled under a newer AMXX version than yours and won't run at all.
What files are needed to compile a plugin locally?
You simply need a working server platform containing the compile.exe file in the scripting folder.
The version of AMXX used in the platform must match that of your server.
How does local plugin compilation work?
It's very easy:
Simply drag the .sma file onto compile.exe.
If the compilation is successful :
you'll find the compiled .amxx file in the scripting/compiled folder.
Take the file from the folder and add/replace it in the plugins folder where your other plugins are located.
Add the plugin's name to plugins.ini if it's not already there.
Common errors:
For errors like "cannot read from file: filename" - you're missing the required library (in this case, filename.inc).
You need to download it and place it in the scripting/include folder.
You can find commonly used libraries here (SOON).