CMD:healall(playerid, params[]) { new string[200] ; LoginCheck(playerid); if(User[playerid][accountAdmin] >= 4) { foreach(new i : Player) { if(i != playerid && User[playerid][accountAdmin] < User[i][accountAdmin]) { PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0); SetPlayerHealth(i, 100.0); } } SendPlayerMessage(COLOR_RED, "[HEAL] "white"Everyone has been healed by an admin."); format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid)); SendAMessage(COLOR_RED, string); } else { SendClientMessage(playerid, -1, "» "red"You are not authorized to use this command."); } return 1; }
CMD:healall(playerid,params[])
{
new string[200];
LoginCheck(playerid);
if(User[playerid][accountAdmin] >= 4)
{
foreach(Player, i)
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerHealth(i,100.0);
}
}
format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid));
SendAMessage(COLOR_RED, string);
}
else return SendClientMessage(playerid, -1, "» "red"You are not authorized to use this command.");
}
C:\Documents and Settings\2012\Desktop\JaKes FuN GM_Linux\JaKe_Linux\gamemodes\blank.pwn(3348) : warning 209: function "cmd_healall" should return a value C:\Documents and Settings\2012\Desktop\JaKes FuN GM_Linux\JaKe_Linux\gamemodes\blank.pwn(3349) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:healall(playerid,params[])
{
new string[200];
LoginCheck(playerid);
if(User[playerid][accountAdmin] >= 4)
{
foreach(Player, i)
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerHealth(i,100.0);
}
}
format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid));
SendAMessage(COLOR_RED, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); // if not, send him only the following message
}
return 1;
}
}
C:\Documents and Settings\2012\Desktop\JaKes FuN GM_Linux\JaKe_Linux\gamemodes\blank.pwn(3348) : warning 209: function "cmd_healall" should return a value C:\Documents and Settings\2012\Desktop\JaKes FuN GM_Linux\JaKe_Linux\gamemodes\blank.pwn(3349) : error 010: invalid function or declaration C:\Documents and Settings\2012\Desktop\JaKes FuN GM_Linux\JaKe_Linux\gamemodes\blank.pwn(3353) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
}
else
return 1;
CMD:healall(playerid,params[]) { new string[200]; LoginCheck(playerid); if(User[playerid][accountAdmin] >= 4) { foreach(Player, i) { PlayerPlaySound(i,1057,0.0,0.0,0.0); SetPlayerHealth(i,100.0); } } format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid)); SendAMessage(COLOR_RED, string); } //-> Warning 3348 else //-> Error 3349 { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); // if not, send him only the following message } return 1; //-> Error 3353 } }
CMD:healall(playerid,params[])
{
new string[200];
LoginCheck(playerid);
if(User[playerid][accountAdmin] >= 4)
{
foreach(Player, i)
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerHealth(i,100.0);
}
}
format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid));
SendAMessage(COLOR_RED, string);
} //-> Warning 3348
else //-> Error 3349
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); // if not, send him only the following message
}
}
return 1; // This needs to be at the last bracket, so it symbolizes the command
}
CMD:healall(playerid,params[])
{
new string[200];
LoginCheck(playerid);
if(User[playerid][accountAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
foreach(Player, i)
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerHealth(i,100.0);
}
format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid));
SendAMessage(COLOR_RED, string);
return 1; // This needs to be at the last bracket, so it symbolizes the command
}
CMD:healall(playerid,params[])
{
new string[200];
LoginCheck(playerid);
if(User[playerid][accountAdmin] >= 4)
{
foreach(Player, i)
{
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerHealth(i,100.0);
}
format(string, 128, "[HEAL] "white"Everyone has been healed by %s.", GetName(playerid));
SendAMessage(COLOR_RED, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
}
return 1;
}
pawn Код:
Which means you should have a return 1 inside the commands brackets, like above. And about the "else", you do not have an "if" to activate it? You might have meant to do underneath. pawn Код:
|