AlliedModders

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

glorian 04-12-2009 16:03

Compile error
 
Hello i got a compile error on my plugins it says "cannot read from file: "colorchat"
Here is my code

Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <cstrike>
#include <colorchat>
new plugin[] = "Incredible"
new money;
new tag;
new plugin_on;
public plugin_init() {
    register_plugin(Incredible, "1.0", "Glorian")
    register_clcmd("say /godmode", "toggle_godmode", ADMIN_CHAT)
    register_clcmd("say /noclip", "toggle_noclip", ADMIN_CHAT)
    register_clcmd("say /money", "give_money", ADMIN_CHAT)
   
    plugin_on = register_cvar("amx_pluginon", "1")
    money = register_cvar("amx_givemoney", "2000")
}
public toggle_godmode(id, level, cid)
{
    if(!cmd_access(id, level, cid, 3))
      return PLUGIN_CONTINUE
    if(get_pcvar_num(plugin_on) == 1)
    {
        if(fm_get_user_godmode(id))
        {
            fm_set_user_godmode(id, 0)
            ColorChat(id, GREEN, "[%s] Your godmode is off", plugin)
        }
        else
        {
            fm_set_user_godmode(id, 1)
            ColorChat(id, GREEN, "[%s] Your godmode is on", plugin)
        }
    }
    else
    {
        ColorChat(id, GREEN, "Be Carful!")
    }
    return PLUGIN_CONTINUE;
}
public toggle_noclip(id, level, cid)
{
    if(!cmd_access(id, level, cid, 3))
      return PLUGIN_HANDLED
    if(get_pcvar_num(plugin_on) == 1)
    {
        if(fm_get_user_noclip(id))
        {
            fm_set_user_noclip(id, 0)
            ColorChat(id, GREEN, "[%s] Your noclip is off", plugin)
        }
        else
        {
            fm_set_user_noclip(id, 1)
            ColorChat(id, GREEN, "[%s] Your noclip is on", plugin)
        }
    }
    else
    {
        ColorChat(id, GREEN, "Be Careful!")
    }
    return PLUGIN_CONTINUE;
}
public give_money(id, level, cid)
{
  if(!cmd_access(id, level, cid, 3))
      return PLUGIN_CONTINUE;
    new pmoney = cs_get_user_money(id)
    cs_set_user_money(id, pmoney + get_pcvar_num(money))
    return PLUGIN_CONTINUE

__________________


fysiks 04-12-2009 16:09

Re: Compile error
 
That means you don't have the file called "/addons/amxmodx/scripting/includes/colorchat.inc"
(case sensitive).

glorian 04-12-2009 16:12

Re: Compile error
 
Ok thx fysiks.

glorian 04-12-2009 16:15

Re: Compile error
 
Can you see what's wrong in the code because i got 4 errors:S

Nextra 04-12-2009 16:18

Re: Compile error
 
PHP Code:

register_plugin(Incredible"1.0""Glorian"

-->
PHP Code:

register_plugin(plugin"1.0""Glorian"

or

PHP Code:

register_plugin("Incredible""1.0""Glorian"


glorian 04-12-2009 16:20

Re: Compile error
 
Thx Nextra but now i got 1 error.

Nextra 04-12-2009 16:21

Re: Compile error
 
What error? The errors on you pic all refer to the one I've fixed above.

fysiks 04-12-2009 16:21

Re: Compile error
 
It tells you what the errors are. Just look on the line that it says it's on.

Incredible -> plugin (Line 12)

glorian 04-12-2009 16:25

Re: Compile error
 
I post a picture
here is the link http://img4.**************/img4/3417/namnlsskh.jpg

fysiks 04-12-2009 16:31

Re: Compile error
 
It says you have an error on line 86 and there are only 73 lines in the code that you posted.


All times are GMT -4. The time now is 02:25.

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