AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Error in logs (https://forums.alliedmods.net/showthread.php?t=84693)

Miko000000 01-30-2009 11:50

Error in logs
 
hello in log i searched this

L 01/30/2009 - 17:08:37: [AMXX] [0] hns.sma::eventDeathMsg (line 488)
L 01/30/2009 - 17:09:17: [CSTRIKE] Player out of range (0)
L 01/30/2009 - 17:09:17: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 01/30/2009 - 17:09:17: [AMXX] Run time error 10: native error (native "cs_set_user_team")
L 01/30/2009 - 17:09:17: [AMXX] [0] hns.sma::eventDeathMsg (line 488)
L 01/30/2009 - 17:16:45: Plugin called message_begin with an invalid message id (0).
L 01/30/2009 - 17:16:45: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 01/30/2009 - 17:16:45: [AMXX] Run time error 10: native error (native "message_begin")
L 01/30/2009 - 17:16:45: [AMXX] [0] hns.sma::client_disconnect (line 1597)
L 01/30/2009 - 17:18:32: Plugin called message_begin with an invalid message id (0).
L 01/30/2009 - 17:18:32: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 01/30/2009 - 17:18:32: [AMXX] Run time error 10: native error (native "message_begin")
L 01/30/2009 - 17:18:32: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 01/30/2009 - 17:18:32: [AMXX] Run time error 10: native error (native


And those are funcions

Code:

if(!is_user_bot(id))
    {
        new display_type = get_pcvar_num(display_type_pcvar)
        if(display_type & SHOW_DISCONNECT)
        {
            new string[200]
            get_cvar_string("cm_disconnect_string",string,199)
            format(string,199,"^x01%s",string)

            if(display_type & SHOW_COLOR)
            {
                new holder[46]

                format(holder,45,"^x04%s^x01",name[id])
                replace(string,199,"%name",holder)

                format(holder,45,"^x04%s^x01",authid[id])
                replace(string,199,"%steamid",holder)

                format(holder,45,"^x04%s^x01",country[id])
                replace(string,199,"%country",holder)

                format(holder,45,"^x04%s^x01",ip[id])
                replace(string,199,"%ip",holder)
            }
            else
            {
                replace(string,199,"%name",name[id])
                replace(string,199,"%steamid",authid[id])
                replace(string,199,"%country",country[id])
                replace(string,199,"%ip",ip[id])
            }

            new num, players[32], player
            get_players(players,num,"ch")
            for(new i=0;i<num;i++)
            {
                player = players[i]
                message_begin(MSG_ONE,saytext_msgid,{0,0,0},player) // line 1597

                write_byte(player)
                write_string(string)
                message_end()

                if(display_type & PLAY_SOUND_DISCONNECT)
                {
                    client_cmd(player,"spk %s",disconnect_soundfile)
                }
            }
        }
    }

Code:

public eventDeathMsg()
{
    new killer = read_data(1)
    new victim = read_data(2)
   
  if(killer == 0 && get_user_team(victim) == 1)
    {
        new lucky = GetRandomCT();
       
        cs_set_user_team(lucky, 1)
        client_print(lucky, print_chat, "[HNS] An idiot jumped off and you were lucky and got transfered to Terrorist.")
       
        cs_set_user_team(lucky, 1)
        client_print(lucky, print_chat, "[HNS] An idiot jumped off and you were lucky and got transfered to Terrorist.")
       
        cs_set_user_team(victim, 2);
       
        GiveItems(lucky)
        SetStealth(lucky)
    }
   
    else if(killer == victim)
    {
        set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer", victim)
       
        return PLUGIN_HANDLED;
    }
   
    else if(get_user_team(killer) == 2)   
    {
        cs_set_user_team(killer, 1);
        cs_set_user_team(victim, 2);
       
        GiveItems(killer)
        SetStealth(killer)
    }
           
    set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer", victim)
   
    return PLUGIN_CONTINUE;
}


Arkshine 01-30-2009 12:42

Re: Error in logs
 
What's the plugin exactly ( link please ) and what is your mod played.

Miko000000 01-30-2009 12:51

Re: Error in logs
 
i bind a lot plugin first code is from hns DM and secon is from GHW connect i think

xPaw 01-30-2009 12:58

Re: Error in logs
 
try
PHP Code:

if(killer == && get_user_team(victim) == 1)

// ->

if( killer != && get_user_team(victim) == 1


Miko000000 01-31-2009 05:24

Re: Error in logs
 
i fix it it was in other task thanx a lot


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

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