10.10.2011, 08:32
And what about the bracket? I get three errors now.
code
code
pawn Код:
CMD:aduty(playerid,params[]){
new string[128];
if(PlayerInfo[playerid][pAdmin] > 1) return SendClientMessage(playerid,COLOR_GRAY,"You're not an admin!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
format(string,sizeof(string),"%s has just went on Admin Duty",GetName(playerid));
SendClientMessageToAll(COLOR_GREEN,string);
SetPlayerHealth(playerid,500000);
SetPlayerColor(playerid,COLOR_CYAN);
PlayerInfo[playerid][pAdminDuty] = 1;
}
else
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
format(string,sizeof(string),"%s has just went off admin duty!");
SendClientMessageToAll(playerid,COLOR_RED,string);
Player[playerid][pAdminDuty] = 0;
}
return 1;
}
}
Код:
C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(709) : warning 209: function "cmd_aduty" should return a value C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(710) : error 010: invalid function or declaration C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(712) : error 010: invalid function or declaration C:\Documents and Settings\Customer\Desktop\GameMode\gamemodes\gangwar.pwn(717) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.