Help with a command +rep
#1

Код:
CMD:am(playerid, params[])
{
	new text[85], astring[128];
	new id;
	if(admin[playerid] == 0)
	{
	if(sscanf(params,"s[85]",text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am <text>");

    format(astring,sizeof(astring), "{006600}[ADMINMESSAGE] %s: %s", pName(playerid), text);
   	MessageToAdmins(COLOR_GREEN,astring);

    format(astring,sizeof(astring), ""COL_RED"[INFO]:"COL_LIME"To reply use /am [id] [message]");
	MessageToAdmins(COLOR_GREEN,astring);
	}
	else if(admin[playerid] >1)
	{
	if(sscanf(params,"us[85]",id,text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am <id> <text>");

    format(astring,sizeof(astring), "{006600}[ADMMESSAGE] %s to %s: %s", pName(playerid),pName(id),text);
   	MessageToAdmins(COLOR_GREEN,astring);

	SendClientMessage(id,COLOR_RED,"{006600}Admin Message from %s: %s",pName(playerid),text);
	}

	return 1;
}
I get warnings at line
Код:
SendClientMessage(id,COLOR_RED,"{006600}Admin Message from %s: %s",pName(playerid),text);
Warnings:
Код:
C:\Users\John\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(3106) : warning 202: number of arguments does not match definition
C:\Users\John\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(3106) : warning 202: number of arguments does not match definition

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

2 Warnings.
Reply
#2

Код:
 new string [50];
format(string,sizeof(string),"{006600}Admin Message from %s: %s",pName(playerid),text);
SendClientMessage(id,COLOR_RED,string);
Edit:change this with the line that has the error
Reply
#3

reped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)