SA-MP Forums Archive
Help please :) ADDED CODE. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please :) ADDED CODE. (/showthread.php?tid=260330)



Help please :) ADDED CODE. - iGetty - 08.06.2011

Ahh, I got these errors,

Код:
line(14174) : warning 202: number of arguments does not match definition
line(14174) : warning 202: number of arguments does not match definition
with this line, \/

pawn Код:
SendClientMessageToAll(WHITE, "{FF3399}[NEWS] Reporter %s: %s", RemoveUnderScore(playerid), message);
How can I fix it?

Thank you for your help!

Full code
pawn Код:
command(news, playerid, params[])
{
    new message[128];
    if(Groups[Player[playerid][Group]][CommandTypes] == 5)
    {
        SendClientMessageToAll(WHITE, "{FF3399}[NEWS] Reporter %s: %s", RemoveUnderScore(playerid), message);
    }
    return 1;
}



Re: Help please :) ADDED CODE. - PGTips - 08.06.2011

SendClientMessageToAll(WHITE, "[NEWS] Reporter %s: %s"), RemoveUnderScore(playerid), message;

Not tested but should work

EDIT: LOL You edited your posted as i posted mey post.

Oh this may help to

SenClientMessage(color, text); thats why i said to try that ^^


Re: Help please :) ADDED CODE. - PGTips - 08.06.2011

EDIT: Wasnt that helpful


Re: Help please :) ADDED CODE. - iGetty - 08.06.2011

Quote:
Originally Posted by PGTips
Посмотреть сообщение
SendClientMessageToAll(WHITE, "[NEWS] Reporter %s: %s"), RemoveUnderScore(playerid), message;

Not tested but should work

EDIT: LOL You edited your posted as i posted mey post.
:'). I am compiling with yours now , just gonna see if if works, and oh.... can I have a cuppa? :3


Код:
(14174) : warning 215: expression has no effect
pawn Код:
SendClientMessageToAll(WHITE, "[NEWS] Reporter %s: %s"), RemoveUnderScore(playerid), message;



Re: Help please :) ADDED CODE. - PGTips - 08.06.2011

Quote:
Originally Posted by getty154
Посмотреть сообщение
:'). I am compiling with yours now , just gonna see if if works, and oh.... can I have a cuppa? :3


Код:
(14174) : warning 215: expression has no effect
pawn Код:
SendClientMessageToAll(WHITE, "[NEWS] Reporter %s: %s"), RemoveUnderScore(playerid), message;
Yes you can have a Cuppa and that means

expression has no effect
The result of the expression is apparently not stored in a variable or
used in a test. The expression or expression statement is therefore
redundant.


Re: Help please :) ADDED CODE. - Babul - 08.06.2011

Код:
command(news, playerid, params[])
{
	new message[128];
	if(Groups[Player[playerid][Group]][CommandTypes] == 5)
	{
		format(message,sizeof(message),"{FF3399}[NEWS] Reporter %s: {FF3399}%s", RemoveUnderScore(playerid), message);
		SendClientMessageToAll(WHITE,message);
	}
	return 1;
}



Re: Help please :) ADDED CODE. - iGetty - 08.06.2011

Quote:
Originally Posted by PGTips
Посмотреть сообщение
Yes you can have a Cuppa and that means

expression has no effect
The result of the expression is apparently not stored in a variable or
used in a test. The expression or expression statement is therefore
redundant.
Just made one :'),

And is there a way to fix that? :3

EDIT: Thanks guy above, testing now :3


Re: Help please :) ADDED CODE. - PGTips - 08.06.2011

Quote:
Originally Posted by Babul
Посмотреть сообщение
Код:
command(news, playerid, params[])
{
	new message[128];
	if(Groups[Player[playerid][Group]][CommandTypes] == 5)
	{
		format(message,sizeof(message),"{FF3399}[NEWS] Reporter %s: {FF3399}%s", RemoveUnderScore(playerid), message);
		SendClientMessageToAll(WHITE,message);
	}
	return 1;
}
Oh yeah you wernt sending the message in a string:S Bice one Babul


Re: Help please :) ADDED CODE. - iGetty - 08.06.2011

Quote:
Originally Posted by PGTips
Посмотреть сообщение
Oh yeah you wernt sending the message in a string:S Bice one Babul
It's nice, but 1 problem, look...



When I type anything, it just comes up blank


Re: Help please :) ADDED CODE. - Firzendxiw - 08.06.2011

Код:
command(news, playerid, params[])
{
	new message[128];
	if(Groups[Player[playerid][Group]][CommandTypes] == 5)
	{
		format(message,sizeof(message),"{FF3399}[NEWS] Reporter %s: {FF3399}%s", RemoveUnderScore(playerid), params);
		SendClientMessageToAll(WHITE,message);
	}
	return 1;
}
Try this, one word edited, hopefully works