16.01.2018, 10:30
PHP код:
CMD:a(playerid, params[]) {
new string[128], Msg[128], pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
if(PlayerInfo[playerid][Level] >= 1)
{
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /a <Text>");
if(PlayerInfo[playerid][Level] == 1)
{
format(string, 128, "[Basic Moderator] {00FC00}%s: %s", pName(playerid), params); <<<<<<======== Error Line (2244)
MessageToAdmins(newblue1, string);
format(Msg, 128, "7[Basic Moderator] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 2)
{
format(string, 128, "[Moderator] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(COLOR_GREEN, string);
format(Msg, 128, "7[Moderator] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 3)
{
format(string, 128, "[Master Moderator] {00FF00}%s: %s", pName(playerid), params);
MessageToAdmins(COLOR_YELLOW, string);
format(Msg, 128, "11[Master Moderator] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 4)
{
format(string, 128, "[Administrator] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(COLOR_ORANGE, string);
format(Msg, 128, "11[Administrator] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 5)
{
format(string, 128, "[Senior Admin] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(blue1, string);
format(Msg, 128, "12[Senior Admin] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 6)
{
format(string, 128, "[Elite Admin] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(COLOR_Silver, string);
format(Msg, 128, "12[Elite Admin] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 7)
{
format(string, 128, "[General] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(red, string);
format(Msg, 128, "4[General] 9%s: %s", pName(playerid), params);
}
else if(PlayerInfo[playerid][Level] == 8)
{
format(string, 128, "[Director] {00FC00}%s: %s", pName(playerid), params);
MessageToAdmins(Color_Major_Elite1, string);
format(Msg, 128, "69[Director] 9%s: %s", pName(playerid), params);
}
} else return SendClientMessage(playerid, red, "ERROR: You need to be administrator to use this command");
return 1;
}
Код:
D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2237) : warning 219: local variable "pName" shadows a variable at a preceding level D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2244) : error 012: invalid function call, not a valid address D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2244) : warning 215: expression has no effect D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2244) : error 001: expected token: ";", but found ")" D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2244) : error 029: invalid expression, assumed zero D:\Data\GTA\NZTDM\Gamemodes\NZTDM-1.pwn(2244) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.