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 60
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 60
|
Script of Change TEAM error:
PHP Code:
public changeTeam( id )
{
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );
case CS_TEAM_T: cs_set_user_team( id, CS_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(!(1 <= 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:
{
__________________