Raised This Month: $51 Target: $400
 12% 

Solved weird motd behavior (Reliable channel overflow)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-11-2019 , 21:11   weird motd behavior (Reliable channel overflow)
Reply With Quote #1

guys i have one really strange problem...the code has /top15 showing, and when head admin put compiled .amxx on the server, every player can see that motd, with stored names, mapname ect, everything normal, but my cs wont load that top, cs is getting bugged (must go retry) and i will be kicked after ~10 sec cuz of Reliable channel overflow. by elimation i saw this is the problem (load_players):
PHP Code:
//globals:
new file256 ]

new 
top_bhops30 ][ //probably will go 100 or 200 than 30 (its for reading lines from file)
static end //is this allright ?
new top_name30 ][ 32 ], top_map30 ][ 32 ], Floattop_prestrafe30 ]


public 
load_playersid )
{
    new 
filee fopenfile"r" )
    new 
line 0
    
new Data256 ], name32 ], bhops], prestrafe11 ], steamid35 ], map32 ]

    if( 
filee )
    {
        while( 
fgetsfileeData149 ) )
        {
            
parseDataname31bhops4prestrafe10steamid34map31 )
            
            
remove_quotesname )
            
            
top_bhopsline ][ ] = line
            top_bhops
line ][ ] = str_to_numbhops )
            
top_prestrafeline ] = str_to_floatprestrafe )
            
            
copytop_nameline ], charsmaxtop_name[] ), name //but with commenting this line and copy below, motd is loaded for everyone, including me, but these lines must be uncommented...(so many tests we did, i hope im not confues if this was a change-situation thing 
            
copytop_mapline ], charsmaxtop_map[] ), map )
            
line++
            
end line
        
}
        
fclosefilee )
        
SortCustom2Dtop_bhopsend 1"Sorting")
    }

can anyone catch any mistakes here???


also here is show top15, but i think its not a questionable here..:
PHP Code:
public show_top15id )
{
    new 
g_sBuffer2048 ]
    
    new 
iLen=0;
    
iLen formatg_sBuffer[iLen], 2047"<meta charset=utf-8><body><center><style type=^"text/css^">body{ background-color: black;color:white; } table {font-family: ^"Trebuchet MS^", Arial, Helvetica, sans-serif;border-collapse: collapse;width: 85%%; font-size: 11px;} th { text-align: left; }" )
    
iLen += formatg_sBuffer[iLen], 2047 iLen"td { padding: 4px; } tr:nth-child(even) {background-color: #1a1a1a;}</style><body><br><div><img src=^"http://milfkz.nobkz.de/images/bga.jpg^" width=^"580^" height=^"45^"/></div><br><table><tr><th width=3%%>#</th><th width=35%%>Name</th><th width=15%%>Bhops</th><th width=15%%>Aver. Pre</th><th width=27%%>On map</th></tr>" )
    
    
for( new 010i++ )
    {
        
iLen += formatg_sBuffer[iLen], 2047 iLen"<tr><td>%d<td>%s<td>%d<td>%.01f<td>%s"1top_nametop_bhops][ ] ], top_bhops][ ], top_prestrafetop_bhops][ ] ], top_maptop_bhops][ ] ] )
    }
    
iLen += formatg_sBuffer[iLen], 2047 iLen"</table></html>" )
    
show_motd(idg_sBuffer"Perfect Bhops")

__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 01-14-2019 at 14:48.
JocAnis is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-12-2019 , 00:15   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #2

amxconst.inc

Code:
/**
* The maximum buffer size that can be displayed in a MOTD.
*/ #define MAX_MOTD_LENGTH 1536
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-12-2019 , 09:14   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #3

@meTaLiCroSS thanks for trying to help, but it doesnt change anything :s still a problem, like server is trying to send me something so low fps, and kick again (with bugged chat...)
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-12-2019 , 15:16   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #4

If it's only you then there is something wrong on your client. Maybe try verifying your game files or worst case scenario, uninstall and re-install the game.
__________________

Last edited by fysiks; 01-12-2019 at 15:24.
fysiks is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-12-2019 , 15:44   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #5

ye i also did 'verify integrity of game files' , found 8 files (who knows which) but it all remains the same...but also, if i put the same .sma code into my lan game, it can be loaded...really weird
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Kushfield
Member
Join Date: Jan 2017
Location: Estonia
Old 01-14-2019 , 10:43   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #6

Quote:
Originally Posted by JocAnis View Post
ye i also did 'verify integrity of game files' , found 8 files (who knows which) but it all remains the same...but also, if i put the same .sma code into my lan game, it can be loaded...really weird
It probably works on new game because you're the only guy on the top there, so the MOTD content is shorter. Try reducing the amount of players shown on the top or otherwise simplifying the page. In the current state, the content length could easily exceed MAX_MOTD_LENGTH.

Should also change g_sBuffer[2048] => g_sBuffer[MAX_MOTD_LENGTH] to make sure it never exceeds the limit.
Kushfield is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-14-2019 , 11:57   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #7

I asked head admin to send me his ini so i can test it on my lan... And he sent me, i put on my lan, and its loaded... With also added max buffer 1536...its not a big problem if its not showing only to me on his server, but it seems to me that the server is also doing/sending motd but i cant recieve it, to be said like that...and im not sure what do here.. But thanks kush anyway

EDIT: im not the only player who cant load that top15 on his server...but again, its not to everyone..wtf is going on hah
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 01-14-2019 at 13:11.
JocAnis is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 01-14-2019 , 14:46   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #8

ok, thanks to kushfield for idea...went to show 5 entries in motd, its working for everyone...tryed to debug strlen of Buffer with 10 players in top, it gave: 1099 characters, but again my cs couldnt open it...to me it looks like it depends on client's max buffer
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-14-2019 , 22:09   Re: weird motd behavior (Reliable channel overflow)
Reply With Quote #9

Quote:
Originally Posted by JocAnis View Post
ok, thanks to kushfield for idea...went to show 5 entries in motd, its working for everyone...tryed to debug strlen of Buffer with 10 players in top, it gave: 1099 characters, but again my cs couldnt open it...to me it looks like it depends on client's max buffer
All clients have the same size buffers . . . so that can't be an issue.
__________________
fysiks 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 07:42.


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