AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sz_getspace overflow (https://forums.alliedmods.net/showthread.php?t=129018)

eNz0 06-08-2010 01:58

sz_getspace overflow
 
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
    }
}


RedRobster 06-08-2010 02:07

Re: sz_getspace overflow
 
Post the entire code so people can see how you get to those functions and/or help you.

Voi 06-08-2010 15:46

Re: sz_getspace overflow
 
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.

Arkshine 06-08-2010 15:55

Re: sz_getspace overflow
 
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 )

eNz0 06-09-2010 01:21

Re: sz_getspace overflow
 
Thanks guys :)

eNz0 06-10-2010 11:47

Re: sz_getspace overflow
 
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

GXLZPGX 06-10-2010 11:51

Re: sz_getspace overflow
 
Quote:

Originally Posted by eNz0 (Post 1204994)
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.

Arkshine 06-10-2010 12:08

Re: sz_getspace overflow
 
The one by commonbullet is an old plugin using cs_user_set_model().

eNz0 06-10-2010 13:36

Re: sz_getspace overflow
 
Thanks, and... i am not as stupid as you think :D

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?

Arkshine 06-10-2010 18:25

Re: sz_getspace overflow
 
To enforce the semicolon. You will get an error while compiling if you forget to put an ; at the end of the expression.


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

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