AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Cant Compile (https://forums.alliedmods.net/showthread.php?t=223852)

5aloOod 08-17-2013 19:12

Cant Compile
 
Hello every one
I want to Compile this code
PHP Code:

#define __COLORCHAT

#include <amxmodx>

#if defined __COLORCHAT
#include <colorchat>
#endif

enum mDatas
{
    
m_iFlag,
    
m_szTag[32]
}

new const 
g_mAdminsDatas[][mDatas] = 
{
    
// let from highest power to lowest
    
<< ( 'b' 0x61 ), "Administrator"},
    { 
<< ( 't' 0x61 ) , "Golden Player"},
    { 
<< ( 's' 0x61 ) , "Silver Player"}
}

public 
plugin_init() 

    
register_plugin("LOGIN Join notifer","0.1","yamin"


public 
client_authorized(id)
{
    new 
iFlags get_user_flags(id)
    for(new 
ii<sizeof(g_mAdminsDatas); i++)
    {
        if( 
iFlags g_mAdminsDatas[i][m_iFlag] )
        {
            new 
szName[32
            
get_user_name(idszNamecharsmax(szName))
#if defined __COLORCHAT
            
new iColor
            
switch( )
            {
                case 
0:iColor Red
                
case sizeof(g_mAdminsDatas)-1:iColor Grey
                
default:iColor Blue
            
}
            
client_print_color(0iColor"^1**** ^4%s^1 has logged in as ^3%s****"szNameg_mAdminsDatas[i][m_szTag])
#else
            
client_print(0print_chat"**** %s has logged in as %s****"szNameg_mAdminsDatas[i][m_szTag])
#endif
            
break
        }
    }


But i have got errors while compile
----------
Please help me if there are an mistakes in code to get the correct code
Thanks :)

YamiKaitou 08-17-2013 19:15

Re: Cant Compile
 
Compiles fine for me. What errors are you getting?

5aloOod 08-17-2013 19:26

Re: Cant Compile
 
2 Attachment(s)
in web compile
and in local compiler

YamiKaitou 08-17-2013 19:30

Re: Cant Compile
 
Web Compiler will never work when using custom include files.
Local Compiler appears to have the incorrect include file

5aloOod 08-17-2013 19:40

Re: Cant Compile
 
Ok, i will not use web compiler
But i have the colorchat.inc in scripting/include so why i get those errors in local compiler ?

Black Rose 08-17-2013 20:09

Re: Cant Compile
 
Because there are multiple colorchat methods for some reason which I will never understand.

I can't find the right one, I only have a download link for my automatic .inc updater.
http://forums.alliedmods.net/attachm...9&d=1340447929

If you want a quick compile you can do that here but I would recommend setting up a local compiler using Pawn Studio or Notepad++ AM Edition for the long run.

5aloOod 08-17-2013 20:23

Re: Cant Compile
 
Thanks black rose :)
code compiled with the colorchat.inc you give


All times are GMT -4. The time now is 16:00.

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