Raised This Month: $ Target: $400
 0% 

sz_getspace overflow


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-08-2010 , 01:58   sz_getspace overflow
Reply With Quote #1

Hi, when there is 21+ players in my server and team change is comming (zombie swarm) i get this error:

Code:
sz_getspace overflow without fsb_allowoverflow set on server reliable datagram
I searched, and i found, that this error comes because of:

cs_set_user_team(i, CS_TEAM_CT)
cs_set_user_team(i, CS_TEAM_T)

because it is executed to more than 21 players. How can i fix this error without deleting this command?

---EDIT----

Code:
public logevent_round_end()
{
    g_endround = true
    
    if(g_roundcounter == get_pcvar_num(cvar_rounds))
    {
        for(new i = 1; i <= g_maxplayers; i++)
        {
            if(!is_user_connected(i))
                continue
            
            
            switch(cs_get_user_team(i))
            {
                case CS_TEAM_T:
                    cs_set_user_team(i, CS_TEAM_CT)
                    
                case CS_TEAM_CT:
                    cs_set_user_team(i, CS_TEAM_T)
            }
            
        }  
        g_roundcounter = 0
    }
}

Last edited by eNz0; 06-08-2010 at 02:39.
eNz0 is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 06-08-2010 , 02:07   Re: sz_getspace overflow
Reply With Quote #2

Post the entire code so people can see how you get to those functions and/or help you.
RedRobster is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 06-08-2010 , 15:46   Re: sz_getspace overflow
Reply With Quote #3

How about you cut the switch to another function set_model(id). Then after checking if is user alive (is_user_connected is totally wrong) put set_task(random_float(0.5,2.0), set_model, id).
Also you should set model on new round event, not end round.
__________________
Voi is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 15:55   Re: sz_getspace overflow
Reply With Quote #4

Don't use cs_user_set_model(), it knows to generate problems. See the method used in PlayerModel by connor, the only method which should be used. ( and used by CS )
__________________
Arkshine is offline
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-09-2010 , 01:21   Re: sz_getspace overflow
Reply With Quote #5

Thanks guys
eNz0 is offline
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-10-2010 , 11:47   Re: sz_getspace overflow
Reply With Quote #6

Oh, one more question, should i use

this:

https://forums.alliedmods.net/showthread.php?t=106094

or this:

http://forums.alliedmods.net/showthread.php?p=181280

Because i cant find PlayerModel by Connor
eNz0 is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-10-2010 , 11:51   Re: sz_getspace overflow
Reply With Quote #7

Quote:
Originally Posted by eNz0 View Post
Oh, one more question, should i use

this:

https://forums.alliedmods.net/showthread.php?t=106094

or this:

http://forums.alliedmods.net/showthread.php?p=181280

Because i cant find PlayerModel by Connor
The first link in that post is by Connor.. ConnorMcLeod. That is what he's talking about.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-10-2010 , 12:08   Re: sz_getspace overflow
Reply With Quote #8

The one by commonbullet is an old plugin using cs_user_set_model().
__________________
Arkshine is offline
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-10-2010 , 13:36   Re: sz_getspace overflow
Reply With Quote #9

Thanks, and... i am not as stupid as you think

I just wanted to know if there were other plugin like this, because code by Connor is quite hard to understand for me...

If i won't make it myself, i think i will ask for help again here.

Question: What does #pragma semicolon 1 do?

Last edited by eNz0; 06-10-2010 at 14:07.
eNz0 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-10-2010 , 18:25   Re: sz_getspace overflow
Reply With Quote #10

To enforce the semicolon. You will get an error while compiling if you forget to put an ; at the end of the expression.
__________________
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:27.


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