01.04.2012, 16:42
hello please help i make my /mask cmd and it got 4 errors why please help me.
Erros
pawn Код:
pMask
pawn Код:
CMD:mask(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
SendClientMessage(playerid, COLOR_GREY, " You are not a member of the Hitman Agency Or CIA!");
return 1;
}
if(PlayerInfo[playerid][pMask] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
PlayerInfo[playerid][pMask] = 1;
GetPlayerName(playerid, GetPlayerNameEx(playerid), sizeof(GetPlayerNameEx(playerid));
format(string, sizeof(string), "* %s has put a mask on.", GetPlayerNameEx(playerid));
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(PlayerInfo[playerid][pMask] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
PlayerInfo[playerid][pMask] = 0;
GetPlayerName(playerid, GetPlayerNameEx(playerid), sizeof(GetPlayerNameEx(playerid)));
format(string, sizeof(string), "* %s has put their mask away.", GetPlayerNameEx(playerid));
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
return 1;
}
pawn Код:
F:\My favorite sa-mp script\gamemodes\EXRP.pwn(32607) : error 072: "sizeof" operator is invalid on "function" symbols
F:\My favorite sa-mp script\gamemodes\EXRP.pwn(32607) : warning 215: expression has no effect
F:\My favorite sa-mp script\gamemodes\EXRP.pwn(32607) : error 001: expected token: ";", but found ")"
F:\My favorite sa-mp script\gamemodes\EXRP.pwn(32607) : error 029: invalid expression, assumed zero
F:\My favorite sa-mp script\gamemodes\EXRP.pwn(32607) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.