AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [HOWTO] Compile locally with custom includes (https://forums.alliedmods.net/showthread.php?t=130511)

drekes 06-24-2010 13:41

[HOWTO] Compile locally with custom includes
 
5 Attachment(s)
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.

http://forums.alliedmods.net/attachm...1&d=1296938682


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(0BLUE"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:

http://forums.alliedmods.net/attachm...1&d=1296939486

The *.amxx file can now be found in the scripting/compiled folder.



If you didn't place the include right, it looks like this:

http://forums.alliedmods.net/attachm...1&d=1296939521


If this occurs, check if you pasted the include in the right folder, and if it has the same name
in the script.

KadiR 06-24-2010 15:30

Re: [HOWTO] Compile locally with custom includes
 
Hi Miley. :mrgreen:
Good tutorial, making the pictures smaller would be better. :wink:

ConnorMcLeod 06-24-2010 16:05

Re: [HOWTO] Compile locally with custom includes
 
You forgot that cheat shortcut on your desktop :P
Seriously, use Alt before you take a screenshot so you only save the active window ;)

NawB 07-09-2010 16:44

Re: [HOWTO] Compile locally with custom includes
 
I do have amxx, and I put in the colorchat.inc in my include folder (Where all .inc files are) Still when I drag an .sma it fails.. :S Any clues? ;o


~Thanks for standing out with me being nooby :D

fysiks 07-09-2010 18:54

Re: [HOWTO] Compile locally with custom includes
 
Quote:

Originally Posted by NawB (Post 1233443)
I do have amxx, and I put in the colorchat.inc in my include folder (Where all .inc files are) Still when I drag an .sma it fails.. :S Any clues? ;o


~Thanks for standing out with me being nooby :D

What are the compiler errors?

NawB 07-09-2010 19:09

Re: [HOWTO] Compile locally with custom includes
 
Quote:

Originally Posted by fysiks (Post 1233583)
What are the compiler errors?

Exactly the same as shown in his picture up there ^ (The ''You didn't install it right'' picture...

drekes 07-09-2010 19:11

Re: [HOWTO] Compile locally with custom includes
 
Can you verify that the .inc file is in the include folder?

NawB 07-10-2010 05:16

Re: [HOWTO] Compile locally with custom includes
 
Here is a shot from my include folder; http://i30.tinypic.com/2v1kx11.jpg

drekes 07-10-2010 09:36

Re: [HOWTO] Compile locally with custom includes
 
That is strange. And you are sure it's colorchat you need and not chatcolor.inc?

NawB 07-10-2010 16:49

Re: [HOWTO] Compile locally with custom includes
 
I have no idea :F Just downloaded the one you put up there LoL.. :S Anyway to check that? :S


All times are GMT -4. The time now is 01:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.