For a french version by
-Kid-, click
Comment compiler en local?
For a dutch version by me, click
Compileren met nieuwe includes
For a list with includes, maintained by
ANTICHRISTUS, click
here.
The first thing you need to do is set everything up.
If you don't have an amxx installation on your pc,
you should start by downloading the latest amxx build
here
If you're not planning on setting up amxx on a listen / dedicated server, you can download the base package instead of the installer.
Unzip it and navigate to the scripting folder.
Once there is should look like this.
Now you have to have the code to compile,
We're gonna use a little example that required the colorchat.inc to compile.
PHP Code:
#include <amxmodx>
#include <colorchat>
public plugin_init()
{
register_plugin("custom include compiling", "0.1", "Drekes");
set_task(100.0, "TaskShowMsg", .flags = "b");
}
public TaskShowMsg()
ColorChat(0, BLUE, "Message");
Before we start compiling we need to add the colorchat include to the scripting/include folder,
just copy - paste it in there.
Now, drag and drop the *.sma (in my case compiletut.sma) onto compile.exe.
For linux compile.exe is compile.so.
A console window appears with the info about the compilation. (errors, warnings, ...)
If you placed the required include right, it should look like this:
The *.amxx file can now be found in the scripting/compiled folder.
If you didn't place the include right, it looks like this:
If this occurs, check if you pasted the include in the right folder, and if it has the same name
in the script.