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 file[ 256 ]
new top_bhops[ 30 ][ 2 ] //probably will go 100 or 200 than 30 (its for reading lines from file)
static end //is this allright ?
new top_name[ 30 ][ 32 ], top_map[ 30 ][ 32 ], Float: top_prestrafe[ 30 ]
public load_players( id )
{
new filee = fopen( file, "r" )
new line = 0
new Data[ 256 ], name[ 32 ], bhops[ 5 ], prestrafe[ 11 ], steamid[ 35 ], map[ 32 ]
if( filee )
{
while( fgets( filee, Data, 149 ) )
{
parse( Data, name, 31, bhops, 4, prestrafe, 10, steamid, 34, map, 31 )
remove_quotes( name )
top_bhops[ line ][ 0 ] = line
top_bhops[ line ][ 1 ] = str_to_num( bhops )
top_prestrafe[ line ] = str_to_float( prestrafe )
copy( top_name[ line ], charsmax( top_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
copy( top_map[ line ], charsmax( top_map[] ), map )
line++
end = line
}
fclose( filee )
SortCustom2D( top_bhops, end + 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_top15( id )
{
new g_sBuffer[ 2048 ]
new iLen=0;
iLen = format( g_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 += format( g_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 i = 0; i < 10; i++ )
{
iLen += format( g_sBuffer[iLen], 2047 - iLen, "<tr><td>%d<td>%s<td>%d<td>%.01f<td>%s", i + 1, top_name[ top_bhops[ i ][ 0 ] ], top_bhops[ i ][ 1 ], top_prestrafe[ top_bhops[ i ][ 0 ] ], top_map[ top_bhops[ i ][ 0 ] ] )
}
iLen += format( g_sBuffer[iLen], 2047 - iLen, "</table></html>" )
show_motd(id, g_sBuffer, "Perfect Bhops")
}
__________________