SA-MP Forums Archive
Erorr while compiling - 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: Erorr while compiling (/showthread.php?tid=614911)



Erorr while compiling - DarkElement - 14.08.2016

So I've put the code "cmd:ar" and I have some errors while compiling, can you help me?

That's the code
Код:
CMD:ar(playerid, params[])
{
	new id;
	if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GREY "/ar [playerid]");
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
			if(PlayerInfo[id][pReported] == 1)
			{
				SendClientMessage(id, COLOR_ATTACK, "Reportul tau a fost primit si este in curs de rezolvare.");
				format(szMessage, sizeof(szMessage), "(/ar) %s has accepted %s's report.",GetName(playerid),GetName(id));
				submitToAdmins(szMessage, COLOR_FRED);
				playerVariables[playerid][pReportAccepted] = id;
				playerVariables[id][pReported] = 0;
				playerVariables[id][pReportAccepted2] = playerid;
			}
		}
	}
	return 1;
}
And there are the errors: http://imgur.com/a/9NA4V


Re: Erorr while compiling - Vince - 14.08.2016

Expecting a comma. Okay, so you missed a comma somewhere. Found -string-. So it's followed by a string.
PHP код:
SCM(playeridCOLOR_GREY "/ar [playerid]");
// _____________________^ 



Re: Erorr while compiling - DarkElement - 14.08.2016

Quote:
Originally Posted by Vince
Посмотреть сообщение
Expecting a comma. Okay, so you missed a comma somewhere. Found -string-. So it's followed by a string.
PHP код:
SCM(playeridCOLOR_GREY "/ar [playerid]");
// _____________________^ 
So..can you fix the code please?


Re: Erorr while compiling - Shinja - 14.08.2016

PHP код:
SCM(playeridCOLOR_GREY"/ar [playerid]"); 



Re: Erorr while compiling - DarkElement - 14.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
PHP код:
SCM(playeridCOLOR_GREY"/ar [playerid]"); 
Thx.


Re: Erorr while compiling - Vince - 14.08.2016

Holy shit, sorry dude, but massive facepalm right there. If you couldn't figure that out then I already feel sorry in advance for your future endeavors.


Re: Erorr while compiling - WhiteGhost - 14.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
PHP код:
SCM(playeridCOLOR_GREY"/ar [playerid]"); 
Stop just giving out the answers let them figure stuff out sometime so they can learn something