04.12.2012, 14:03
(
Последний раз редактировалось zionx08; 04.12.2012 в 14:07.
Причина: Add info
)
I wan't to create a /team commands to view online admin and helpers in one command in one time.
Finally i ended up with 6 errors.Can anyone help me fix this commands?
And error code
Finally i ended up with 6 errors.Can anyone help me fix this commands?
pawn Код:
CMD:team(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "{4985d7}[Admin Team] {a7c2e6}- Administrators:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 6 )
{
new adminfo[64], sendername[MAX_PLAYER_NAME], string[128], helperinfo[64];
if(PlayerInfo[i][pAdmin] == 5) { adminfo = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 4) { adminfo = "Head Of Admin"; }
else if(PlayerInfo[i][pAdmin] == 3) { adminfo = "Lead Admin"; }
else if(PlayerInfo[i][pAdmin] == 2) { adminfo = "Basic Admin"; }
else if(PlayerInfo[i][pAdmin] == 1) { adminfo = "Trial Admin"; }
else if(PlayerInfo[i][pHelper] == 1) { helperinfo = "Helper"; }
else { adminfo = "Admin"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 128, "{e1e3e6} - %s %s", adminfo, sendername);
SendClientMessage(playerid, random(0xFFFFFFFF), string);
}
else
{
format(string, 128, "{7bd25c} - %s %s [ADMIN DUTY]", adminfo, sendername);
SendClientMessage(playerid, 0xFAAFBEFF, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{4985d7}[Helper Team] {a7c2e6}- Helpers:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pHelper] >= 1 && PlayerInfo[i][pHelper] <= 2)
{
new sendername[MAX_PLAYER_NAME], string[128], helperinfo[64];
if(PlayerInfo[i][pHelper] == 1) { adminfo = "Helper"; }
else { helperinfo = "Helper"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 128, "{e1e3e6} - %s %s", helperinfo, sendername);
SendClientMessage(playerid, random(0xFFFFFFFF), string);
}
else
{
format(string, 128, "{7bd25c} - %s %s [HELPER DUTY]", helperinfo, sendername);
SendClientMessage(playerid, 0xFAAFBEFF, string);
}
}
}
}
}
}
}
}
return 1;
}
Код:
C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(1612) : error 017: undefined symbol "HeadshotCheck" C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(1611) : warning 203: symbol is never used: "blahz" C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(1611) : warning 203: symbol is never used: "blahy" C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(1611) : warning 203: symbol is never used: "blahx" C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3190) : error 029: invalid expression, assumed zero C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3193) : warning 219: local variable "i" shadows a variable at a preceding level C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3199) : warning 219: local variable "sendername" shadows a variable at a preceding level C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3199) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3199) : warning 219: local variable "helperinfo" shadows a variable at a preceding level C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3220) : warning 217: loose indentation C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3224) : warning 217: loose indentation C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3224) : error 029: invalid expression, assumed zero C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3224) : error 017: undefined symbol "cmd_report" C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3224) : error 029: invalid expression, assumed zero C:\Users\Admin\Documents\Server\The Andreas\gamemodes\TheAndreasife.pwn(3224) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.