Errors /news - 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: Errors /news (
/showthread.php?tid=586441)
Errors /news -
Jimmi - 22.08.2015
(25474) : error 001: expected token: ",", but found "return"
25474
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");
Re: Errors /news -
IgorLuiz - 22.08.2015
send the complete code!
Re: Errors /news -
Jimmi - 22.08.2015
Код:
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;
}
Re: Errors /news -
J0sh... - 22.08.2015
PHP код:
if(!IsPlayerInVehicle(playerid, Reporteri[0] && !IsPlayerInVehicle(playerid, Reporteri[12]))
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");
Re: Errors /news -
Jimmi - 22.08.2015
(25466) : error 001: expected token: ")", but found "return"
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");
Re: Errors /news -
J0sh... - 22.08.2015
PHP код:
if(!IsPlayerInVehicle(playerid, Reporteri[0] && !IsPlayerInVehicle(playerid, Reporteri[12]))) // 3 Open brackets that were not closed.
return SendClientMessage(playerid, COLOR_GREY, "Nu esti in duba reporterilor sau in elicopter!");