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

Solved weird motd behavior (Reliable channel overflow)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Thread Tools
Display Modes

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 06:54.


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