argument type mismatch (argument 2)
#7

Quote:
Originally Posted by NBass
Посмотреть сообщение
Thanks, seems working!

Do you maybe know, how can i get a Player name to the Textdraw now? Anyway, thanks for help, letting me understand, how all this works.
you can do a simple change on the function to put the exact new name which found, on the string which passed.

->
Код:
stock GetPlayerIdFromName(playername[])
{
  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      new playername2[MAX_PLAYER_NAME];
      GetPlayerName(i, playername2, sizeof(playername2));
      if(strcmp(playername2, playername, true, strlen(playername)) == 0)
      {
        format(playername, sizeof playername2,  playername2);
        return i;
      }
    }
  }
  return INVALID_PLAYER_ID;
}
and later:

PHP код:
format(Pdb_ZP_namesizeof(Pdb_ZP_name), "%s"id); // maybe id, but seems not working. 
to ->
PHP код:
format(Pdb_ZP_namesizeof(Pdb_ZP_name), "%s"inputtext); // maybe id, but seems not working. 
Reply


Messages In This Thread
argument type mismatch (argument 2) - by NBass - 04.04.2017, 14:09
Re: argument type mismatch (argument 2) - by jlalt - 04.04.2017, 14:15
Re: argument type mismatch (argument 2) - by Toroi - 04.04.2017, 14:16
Re: argument type mismatch (argument 2) - by NBass - 04.04.2017, 14:47
Re: argument type mismatch (argument 2) - by jlalt - 04.04.2017, 15:00
Re: argument type mismatch (argument 2) - by NBass - 04.04.2017, 15:25
Re: argument type mismatch (argument 2) - by jlalt - 04.04.2017, 15:32
Re: argument type mismatch (argument 2) - by NBass - 04.04.2017, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)