'~DaLesTe^' Posted May 3, 2015 Share Posted May 3, 2015 I was looking for a server when I saw this: what is it? Print: http://prntscr.com/718x9l Link to comment
Castillo Posted May 4, 2015 Share Posted May 4, 2015 It's a bug caused when the server has a lot of players ( over 100 ). Link to comment
Mr_Moose Posted May 4, 2015 Share Posted May 4, 2015 It's probably related to player ID's as it seems to loop through the array with the length defined as the player count, let's say there are three players online, 1, 2 and 3, then the player with ID 2 leaves the server. When someone tries to query the list they see 2 players online but only player 1 is listed as there is no player 2. It's only a guess though. // Get player nicks vecPlayers.clear (); while ( i < nLength ) { std::string strPlayer; try { if ( ReadString ( strPlayer, szBuffer, i, nLength ) ) { // Remove color code, unless that results in an empty string SString strResult = RemoveColorCodes ( strPlayer.c_str () ); if ( strResult.length () == 0 ) strResult = strPlayer; if ( ( uiMasterServerSaysRestrictions & ASE_FLAG_PLAYER_LIST ) == false ) vecPlayers.push_back ( strResult ); } } catch ( ... ) { // yeah that's what I thought. return false; } } Here's the code: starting at line 602. https://github.com/multitheftauto/mtasa-blue/blob/master/MTA10/core/CServerList.cpp Link to comment
Rob0 Posted May 7, 2015 Share Posted May 7, 2015 Shouldn't expect a bit of code as simple as this to do the right thing all of the time anyway. As it only affects the largest rooms as you say, unless it is obscuring those nicks from being searched. Regardless, a night of stab-in-the-dark debugging will fix anything. // Get player nicks vecPlayers.clear (); while ( i < nLength ) { std::string strPlayer; try { if ( ReadString ( strPlayer, szBuffer, i, nLength ) ) { // Remove color code, unless that results in an empty string SString strResult = RemoveColorCodes ( strPlayer.c_str () ); if ( strResult.length () == 0 ) strResult = strPlayer; if ( ( uiMasterServerSaysRestrictions & ASE_FLAG_PLAYER_LIST ) == false ) vecPlayers.push_back ( strResult ); } } catch ( ... ) { // yeah that's what I thought. return false; } } Never neglect the little things... they can bring us all down. Like having a game motto whose first two word are "Stop Playing.." or a white boy poster child for a largely non-european audience lacking girls. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now