Errors /news
#1

(25474) : error 001: expected token: ",", but found "return"


25474
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");
Reply
#2

send the complete code!
Reply
#3

Код:
CMD:news(playerid, params[])
{
		new string[128], result[80],sendername[24];

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
	   return SendClientMessage(playerid, COLOR_GREY, "Nu esti un reporter!");

	if(!IsPlayerInVehicle(playerid, Reporteri[0] && !IsPlayerInVehicle(playerid, Reporteri[12])
	   return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");

	if(sscanf(params, "s[80]", result))
	   return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /news [newstext]");

	GetPlayerName(playerid, sendername, sizeof(sendername));

	format(string, sizeof(string), "{FFBF00}Reporter %s : %s {00FFFF}", sendername, result);
	OOCNews(COLOR_NEWS,string);

	PlayerInfo[playerid][pNewsSkill] ++;
	Update(playerid, pNewsSkillx);

	if(PlayerInfo[playerid][pNewsSkill] == 50) {
	   SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 2."); }
	else if(PlayerInfo[playerid][pNewsSkill] == 100) {
	   SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 3."); }
	else if(PlayerInfo[playerid][pNewsSkill] == 200) {
	   SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 4."); }
	else if(PlayerInfo[playerid][pNewsSkill] == 400) {
	   SendClientMessage(playerid, COLOR_YELLOW, "* Your news reporter skill is now level 5."); }
	return 1;
}
Reply
#4

PHP код:
if(!IsPlayerInVehicle(playeridReporteri[0] && !IsPlayerInVehicle(playeridReporteri[12]))
       return 
SendClientMessage(playeridCOLOR_GREY"Nu esti in duba reporterilor sau in elicopter!"); 
Reply
#5

(25466) : error 001: expected token: ")", but found "return"
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");
Reply
#6

PHP код:
if(!IsPlayerInVehicle(playeridReporteri[0] && !IsPlayerInVehicle(playeridReporteri[12]))) // 3 Open brackets that were not closed.
       
return SendClientMessage(playeridCOLOR_GREY"Nu esti in duba reporterilor sau in elicopter!"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)