OnIncomingConnection Bug
#1

OnIncomingConnection is a new callback (added in 0.3z R2-2) Which is called when a player attemp to join the server.

It will return 3 parameters :
  • playerid (Integer) = That player ID Wants to connect
  • ip_address (String) = Player's IP (length = 15)
  • port (Int) player's port
I Have tested this function, but it has a bug. In this callback , Player's name doesn't returned.

I Have tested it with this way:

pawn Код:
stock PlayerName(playerid)
{
    new
        playerName[MAX_PLAYER_NAME+1];
   
    GetPlayerName(playerid, playerName, sizeof(playerName));
    return playerName;
}
pawn Код:
public OnIncomingConnection(playerid, ip_address[], port)
{
    printf("Incoming connection for player ID %i - (Name : %s) [IP/port: %s:%i]", playerid, PlayerName(playerid), ip_address, port);
    return 1;
}
That isn't because of PlayerName(playerid), Because the result with GetPlayerName is same.

Player Name under this callback is NULL.
Reply


Messages In This Thread
OnIncomingConnection Bug - by iFarbod - 16.06.2014, 09:54
Re: OnIncomingConnection Bug - by iZN - 16.06.2014, 10:31
Re: OnIncomingConnection Bug - by iFarbod - 16.06.2014, 13:10
Re: OnIncomingConnection Bug - by [WSF]ThA_Devil - 16.06.2014, 13:52

Forum Jump:


Users browsing this thread: 3 Guest(s)