AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cs_get_user_team error log o_O (https://forums.alliedmods.net/showthread.php?t=298683)

D3XT3R 06-20-2017 10:20

cs_get_user_team error log o_O
 
Hi Ther i have error of cs_get_user_team and i tired all ways to fix and i didnt found any thing show me its wrong code so can any one take look for the script

Error Log:
Quote:

L 06/20/2017 - 01:04:23: Start of error session.
L 06/20/2017 - 01:04:23: Info (map "cs_1337_assault") (file "addons/amxmodx/logs/error_20170620.log")
L 06/20/2017 - 01:04:23: [CSTRIKE] Invalid player 1
L 06/20/2017 - 01:04:23: [AMXX] Displaying debug trace (plugin "Umbrella_Swarm.amxx", version "6.0")
L 06/20/2017 - 01:04:23: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/20/2017 - 01:04:23: [AMXX] [0] Umbrella_Swarm.sma::changeTeam (line 2144)
L 06/20/2017 - 16:11:28: Start of error session.
L 06/20/2017 - 16:11:28: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20170620.log")
L 06/20/2017 - 16:11:28: [CSTRIKE] Invalid player 22
L 06/20/2017 - 16:11:28: [AMXX] Displaying debug trace (plugin "Umbrella_Swarm.amxx", version "6.0")
L 06/20/2017 - 16:11:28: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/20/2017 - 16:11:28: [AMXX] [0] Umbrella_Swarm.sma::cmdRespawn (line 608)
L 06/20/2017 - 16:29:59: [CSTRIKE] Invalid player 3
L 06/20/2017 - 16:29:59: [AMXX] Displaying debug trace (plugin "Umbrella_Swarm.amxx", version "6.0")
L 06/20/2017 - 16:29:59: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/20/2017 - 16:29:59: [AMXX] [0] Umbrella_Swarm.sma::cmdRespawn (line 608)
Script of Change TEAM error:
PHP Code:

public changeTeamid )
{
    switch( 
cs_get_user_teamid ) )
    {
        case 
CS_TEAM_CTcs_set_user_teamidCS_TEAM_T );
        case 
CS_TEAM_Tcs_set_user_teamidCS_TEAM_CT );
    }

    
round_count 0;


Hier the code of that line 2144
Quote:

switch( cs_get_user_team( id ) )

PHP Code:

public cmdRespawn(id)
{
    
//log_to_file(g_logfile, "cmdRespawn");
    
remove_task(id+TID_RESP);
    
    if((
get_pcvar_num(cvar_zombie_respawn) || get_pcvar_num(cvar_human_respawn)) && gRoundStarted)
    {
        static 
CsTeams:team;
        
        if(!(
<= id <= 32))
            return;
            
        
team cs_get_user_team(id);
        
        if(!
is_user_connected(id) || is_user_alive(id) || (team != CS_TEAM_T && team != CS_TEAM_CT))
            return;
        
        switch(
team)
        {
            case 
CS_TEAM_T:
            { 


Natsheh 06-20-2017 10:31

Re: cs_get_user_team error log o_O
 
Show the full code...

D3XT3R 06-20-2017 10:51

Re: cs_get_user_team error log o_O
 
Quote:

Originally Posted by Natsheh (Post 2530073)
Show the full code...

we all know if i show the full code will be stolen + will no one help me in code of 4000+ Line

Natsheh 06-20-2017 10:59

Re: cs_get_user_team error log o_O
 
I'm. Pretty sure the code is awful, why you scared sharing the code??

Anyway just show how is changeteam function is called...

D3XT3R 06-20-2017 11:07

Re: cs_get_user_team error log o_O
 
get called by delay

Natsheh 06-20-2017 11:08

Re: cs_get_user_team error log o_O
 
I dont know what its suppose to mean just do what i said previously..

D3XT3R 06-20-2017 11:09

Re: cs_get_user_team error log o_O
 
PHP Code:

public add_delay(id)
{
    switch(
id)
    {
        case 
1..8set_task(0.1"changeTeam"id);
        case 
9..16set_task(0.2"changeTeam"id);
        case 
17..24set_task(0.3"changeTeam"id);
        case 
25..32set_task(0.4"changeTeam"id);
    }



Natsheh 06-20-2017 11:12

Re: cs_get_user_team error log o_O
 
Show add delay how its called...

You do realise that there is no point of add delay function??

D3XT3R 06-20-2017 11:15

Re: cs_get_user_team error log o_O
 
now dont ask how round end called -.- if you want i will know you bad scripter :D....

PHP Code:

public OnRoundEnd()
{
    
gRoundStarted false;
    
    if(
round_count >= get_pcvar_num(cvar_round_switch))
    {
        new 
players[32], num;
        
get_players(playersnum);
        
        for(new 
0numi++)
            
add_delay(players[i]);
        
        
client_printcolor(0"/ctrSwitching teams !!!");
        
round_count 0;
    }



Natsheh 06-20-2017 11:20

Re: cs_get_user_team error log o_O
 
In cmdrespawn check if is user connected before getting his team.


All times are GMT -4. The time now is 23:04.

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