number of arguments does not match definition
#1

Please help me in this:
Код:
/ScShortcut/Commands.pwn(21) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(38) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(47) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(47) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(56) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(56) : warning 202: number of arguments does not match definition
/ScShortcut/Commands.pwn(77) : warning 202: number of arguments does not match definition
evrything is okey but i can't understand hwat's the wrong with it. Line's
Код:
(21) SendClientMessageEx(playerid, COLOR_WHITE, "You have changed LockerID %d's position", lid);
(38) SendClientMessageEx(playerid, COLOR_WHITE, "You have changed LockerID %d Deliver Point", lid);
(47) SendClientMessageEx(playerid, COLOR_WHITE, "You have changed LockerID %d's Materials to %s", lid, AddCommas(LockerInfo[lid][lmats]));
(56) SendClientMessageEx(playerid, COLOR_WHITE, "You have changed LockerID %d's Group to %d", lid, amount);
(77) SendClientMessageEx(playerid, COLOR_WHITE, "You have deleted LockerID %d", lid);
Help please
Reply
#2

Change
pawn Код:
SendClientMessageEx
to
pawn Код:
SendClientMessage
Try, Maybe this would work.
Reply
#3

show us that function (SendClientMessageEx)

it should look similar to this
pawn Код:
SendClientMessageEx(playerid, color, const message[], {Float,_}:...)
//& then work with numargs + getarg to get all the stuff for your formatted message
Reply
#4

Код:
SendClientMessageEx(playerid, color, string[])
{
	if(InsideMainMenu[playerid] == 1 || InsideTut[playerid] == 1 || ActiveChatbox[playerid] == 0)
		return 0;

	else SendClientMessage(playerid, color, string);
	return 1;
}
Reply
#5

Use format first.

pawn Код:
new msg[50];
format(msg, sizeof (msg), "You have changed LockerID %d's position", lid);
SendClientMessage(playerid, -1, msg);
Do the same for the rest.
Reply
#6

Or use SendClientFormattedMessage (custom function from a french scripter that I thank again, MrFredo)

http://pastebin.com/YVash4eC

Using the function, you don't have to use format any more for SendClientMessage(ToAll).

But it's highly recommended to use format when you begin in the pawn.
Reply
#7

Problem Solved using
Код:
new string[128];
format(string, sizeof (string), "You have changed LockerID %d's position", lid);
SendClientMessage(playerid, -1, string);
thanks everyone
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)