error 035: argument type mismatch (argument 3)? Please help!
#1

Hey, just added an anti-jetpack system to my server. But, I get this error:

Код:
(1095) : error 035: argument type mismatch (argument 3)
Line 1095:

pawn Код:
strcat(string, "{FF0000}Name: %s\n", pName);
I have defined the name,

pawn Код:
new string[952], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
strcat(string, "{FF0000}Name: %s\n", pName);
But I don't see a problem?
Reply
#2

Why is no one posting?
Reply
#3

pawn Код:
new string[20+MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pName, sizeof(pName));
strcat(string, "{FF0000}Name: ");
strcat(string, pName);
Do not waste 900 cells. Format is better solution in this case
Reply
#4

ok ill try
Reply
#5

I see max 400 characters here.
pawn Код:
strcat(string, "{FF0000}Name: %s\n", pName);
//To
format(string, sizeof string, "{FF0000}Name: %s\n", pName);
strcat concatenates strings, format formats string according to substitutions pattern
Reply
#6

Ok thanks, I tried it and it works perfectly! Thanks for your help, +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)