I can`t save player name to enum
#3

You can directly store it into the array:

Код:
GetPlayerName(playerid, RoomInfo[i][Owner], MAX_PLAYER_NAME);
Furthermore the strcat line at the end is not quite correct.
You append to the pDialog array, however pass the size of the format1 array (pDialog is 2100 cells, format1 is 40 so the strcat only writes to the 40th index of pDialog).
It needs to be:

Код:
strcat(pDialog, format1, sizeof(pDialog));
Or just leave away the last argument as it does that automatically.


Quote:
Originally Posted by Mike861
Посмотреть сообщение
Why didn't you put i instead of playerid in GetPlayerName?
i is the index for the RoomInfo array, not a playerid.
Reply


Messages In This Thread
I can`t save player name to enum - by 3417512908 - 14.07.2018, 14:29
Re: I can`t save player name to enum - by Mike861 - 14.07.2018, 14:45
Re: I can`t save player name to enum - by NaS - 14.07.2018, 14:47
Re: I can`t save player name to enum - by Akeem - 14.07.2018, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)