Whats the difference between strcpy and format
#3

Quote:
Originally Posted by RoboN1X
Посмотреть сообщение
The way you use sizeof(pInfo[playerid][pTag]) seems wrong, i doubt it will even compile, you'd need to put a #define MAX_TAG_LEN 32 in place of pTag size and use it as well in functions that need the pTag size.
Код:
#define MAX_TAG_LEN 32
enum PlayerData
{
     pTag[MAX_TAG_LEN]
}


strcpy(pInfo[playerid][pTag], "Something", MAX_TAG_LEN);
I would never use format() without need to change the "format" in the string itself (i.e. not using the arguments in place of %)


You can read the "Copying string" section on https://sampforum.blast.hk/showthread.php?pid=3517039#pid3517039
wtf reply xD
Reply


Messages In This Thread
Whats the difference between strcpy and format - by NoteND - 27.02.2019, 09:25
Re: Whats the difference between strcpy and format - by RoboN1X - 27.02.2019, 09:37
Re: Whats the difference between strcpy and format - by NoteND - 27.02.2019, 11:55

Forum Jump:


Users browsing this thread: 1 Guest(s)