AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Fatal Error Related To OverFlow (https://forums.alliedmods.net/showthread.php?t=229207)

Jhob94 11-03-2013 11:00

Fatal Error Related To OverFlow
 
When server has many players, sometimes this happens:
Code:

FATAL ERROR (shutting down): SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram
Is it possible because i have team swtich on CT Win + Instant Team Balance?

santuzzu 11-03-2013 12:05

Re: Fatal Error Related To OverFlow
 
yes it is posible.
i used instant team balance (orpheu version) on a zombie plague 4.3 server and that error occured if were 25 players or more
that error is also related to team switch.on furien mod.if switching 23 players from ts to ct and viceversa that error will crash the server

DeLiriuM 11-03-2013 12:07

Re: Fatal Error Related To OverFlow
 
Update dproto :crab: :twisted:

Jhob94 11-03-2013 12:10

Re: Fatal Error Related To OverFlow
 
Quote:

Originally Posted by santuzzu (Post 2056461)
yes it is posible.
i used instant team balance (orpheu version) on a zombie plague 4.3 server and that error occured if were 25 players or more
that error is also related to team switch.on furien mod.if switching 23 players from ts to ct and viceversa that error will crash the server

Ok thanks, will find a way to do it better :D

Quote:

Originally Posted by DeLiriuM (Post 2056462)
Update dproto :crab: :twisted:

what? lol, it seems you really dont know what you talking about.

santuzzu 11-03-2013 12:16

Re: Fatal Error Related To OverFlow
 
must do semething like this

public BeginDelayedTeamChange( id )
{

switch( id )
{

case 1..6: set_task( 0.1, "ChangeUserTeamWithDelay", id + SWITCH_TASK );
case 7..13: set_task( 0.2, "ChangeUserTeamWithDelay", id + SWITCH_TASK );
case 14..20: set_task( 0.3, "ChangeUserTeamWithDelay", id + SWITCH_TASK );
case 21..26: set_task( 0.4, "ChangeUserTeamWithDelay", id + SWITCH_TASK );
case 27..32: set_task( 0.5, "ChangeUserTeamWithDelay", id + SWITCH_TASK );
}
}

and dont use instant team balance on zp.i think is useless ,after all doesnt matter how many ct or ts has a team :)

Jhob94 11-03-2013 18:48

Re: Fatal Error Related To OverFlow
 
Quote:

Originally Posted by santuzzu (Post 2056470)
and dont use instant team balance on zp.i think is useless ,after all doesnt matter how many ct or ts has a team :)

I never said is zp. First server in my signature doesnt runs zp and isnt based on it. Second, is for furien :P

Anyway, if the problem is really this, it can be fixed easy :3

Kia 11-04-2013 02:52

Re: Fatal Error Related To OverFlow
 
Use a delayed Team Switch, see Exolent's HnS Plugin or my Furien Mod for the code, both use the same.

Jhob94 11-04-2013 14:27

Re: Fatal Error Related To OverFlow
 
Well, i edited connors plugin.
PHP Code:

#include <amxmodx>
#include <cstrike>

new const VERSION[] = "0.0.4"

const MAX_PLAYERS 32

new g_MaxPlayers

public plugin_init()
{
    
register_plugin("Switch Teams & Balance"VERSION"ConnorMcLeod")
    
    
register_event("SendAudio""Event_SendAudio_MRAD_ctwin""a""1=0""2=%!MRAD_ctwin")
    
register_logevent("balance_teams"2"1=Round_Start")
    
    
g_MaxPlayers get_maxplayers()
}

public 
Event_SendAudio_MRAD_ctwin()
{
    new 
iPlayers[MAX_PLAYERS], iNumid
    get_players
(iPlayersiNum)
    
    for(new 
ii<iNumi++)
    {
        
id iPlayers[i]
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
                
cs_set_user_team(idCS_TEAM_CTCS_CT_GIGN)
            }
            case 
CS_TEAM_CT:
            {
                
cs_set_user_team(idCS_TEAM_TCS_T_LEET)
            }
        }
    }


balance_teams()
{
    new 
amount_humansamount_furiens
    amount_humans 
GetHumansCount()
    
amount_furiens GetFuriensCount()
    
    if(
amount_humans == amount_furiens)
        return
    
    else if(
amount_humans amount_furiens)
    {
        new 
diferenca
        diferenca 
= (amount_humans amount_furiens)
        
        if(
diferenca == 1)
            return
            
        else
        {
            new 
iPlayers[MAX_PLAYERS], iNumid
            get_players
(iPlayersiNum"e""CT")
            
            
id iPlayers[random(iNum)]
            
cs_set_user_team(idCS_TEAM_TCS_T_LEET)
            
balance_teams()
        }
    }
    
    else if(
amount_furiens amount_humans)
    {
        new 
diferenca
        diferenca 
= (amount_furiens amount_humans)
        
        if(
diferenca == 1)
            return
            
        else
        {
            new 
iPlayers[MAX_PLAYERS], iNumid
            get_players
(iPlayersiNum"e""TERRORIST")
            
            
id iPlayers[random(iNum)]
            
cs_set_user_team(idCS_TEAM_CTCS_CT_GIGN)
            
balance_teams()
        }
    }
}

stock GetHumansCount()
{
    static 
HumansidHumans id 0
    
    
for (id 1id <= g_MaxPlayersid++)
    {
        if(!
is_user_connected(id))
            continue
            
        if(
cs_get_user_team(id) == CS_TEAM_CT)
            
Humans++
    }
    
    return 
Humans
}

stock GetFuriensCount()
{
    static 
FuriensidFuriens id 0
    
    
for (id 1id <= g_MaxPlayersid++)
    {
        if(!
is_user_connected(id))
            continue
            
        if(
cs_get_user_team(id) == CS_TEAM_T)
            
Furiens++
    }
    
    return 
Furiens


That would be fine or that could still causing overflow crash? I did with round start instead of round end because i think round end is more close to message audio.
Btw it would balance people before they spawn right?

alan_el_more 11-05-2013 08:37

Re: Fatal Error Related To OverFlow
 
Try this: http://https://forums.alliedmods.net...d.php?t=163555

^SmileY 11-05-2013 10:21

Re: Fatal Error Related To OverFlow
 
This problem is not fixed in last dev builds?


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

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