SA-MP Forums Archive
number of arguments does not match definition - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: number of arguments does not match definition (/showthread.php?tid=507229)



number of arguments does not match definition - xamen - 16.04.2014

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


Re: number of arguments does not match definition - Bingo - 16.04.2014

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


Re: number of arguments does not match definition - CutX - 16.04.2014

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



Re : number of arguments does not match definition - xamen - 16.04.2014

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

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



Re: number of arguments does not match definition - Konstantinos - 16.04.2014

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.


Re : number of arguments does not match definition - S4t3K - 16.04.2014

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.


Re : number of arguments does not match definition - xamen - 16.04.2014

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