How to fix this warning
#1

Hi, I have this one working 100%

Код:
format(szMessage, sizeof(szMessage), "You have accepted the invitation and joined the %s, you were invited by %s.", FamilyInfo[InviteFamily[playerid]][FamilyName], GetPlayerNameEx(InviteOffer[playerid]));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);
And wanted to change it to like that:
Код:
format(string, sizeof(string), "You have accepted %s's invite, and are now a member of %s.", 
GetPlayerNameEx(InviteOffer[playerid], FamilyInfo[InviteFamily[playerid]][FamilyName]));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
But giving me this one warnung why?
Код:
 warning 202: number of arguments does not match definition
Reply
#2

Assuming your GetPlayerNameEx function has only one parameter which would be player ID,
PHP код:
GetPlayerNameEx(InviteOffer[playerid], FamilyInfo[InviteFamily[playerid]][FamilyName]));
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring); 
needs to become:

PHP код:
GetPlayerNameEx(InviteOffer[playerid]), GetPlayerNameEx(FamilyInfo[InviteFamily[playerid]][FamilyName]) 
Reply
#3

Tested, giving me this

error 001: expected token: ",", but found ";"
Reply
#4

Show me what you did and also show your GetPlayerNameEx code.
Reply
#5

Try this
PHP код:
format(stringsizeof(string), "You have accepted %s's invite, and are now a member of %s."
GetPlayerNameEx(InviteOffer[playerid]), FamilyInfo[InviteFamily[playerid]][FamilyName]);
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring); 
Reply
#6

Post your GetPlayerNameEx function
Reply
#7

Код:
stock GetPlayerNameEx(playerid) {

	new
		szName[MAX_PLAYER_NAME],
		iPos;

	GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
	while ((iPos = strfind(szName, "_", false, iPos)) != -1) szName[iPos] = ' ';
	return szName;
}
Reply
#8

What about:
PHP код:
format(stringsizeof(string), "You have accepted %s's invite, and are now a member of %s."GetPlayerNameEx(InviteOffer[playerid]), FamilyInfo[InviteFamily[playerid]][FamilyName]);
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring); 
Reply
#9

Try this one maybe help.

PHP код:
format(szMessagesizeof(szMessage), "You have accepted %s's invite, and are now a member of %s."GetPlayerNameEx(InviteOffer[playerid]), FamilyInfo[InviteFamily[playerid]][FamilyName]);
SendClientMessageEx(playeridCOLOR_LIGHTBLUEszMessage); 
Reply
#10

Quote:
Originally Posted by Usmanmemon
Посмотреть сообщение
Try this one maybe help.

PHP код:
format(szMessagesizeof(szMessage), "You have accepted %s's invite, and are now a member of %s."GetPlayerNameEx(InviteOffer[playerid]), FamilyInfo[InviteFamily[playerid]][FamilyName]);
SendClientMessageEx(playeridCOLOR_LIGHTBLUEszMessage); 
Lol. This is exactly what I wrote.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)