04.04.2012, 18:08
Hi, I am getting these errors for my /aduty command,
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41240 -- 41242) : error 001: expected token: ",", but found ";"
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242) : error 029: invalid expression, assumed zero
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242 -- 41243) : error 029: invalid expression, assumed zero
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242 -- 41243) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
And this is the scripting of the /aduty command.
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerColor(playerid, 0xFF550000);
new string[128];
PlayerInfo[playerid][pTogReports] = 0;
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (Is Now OOC)", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
if PlayerInfo[playerid][pAdminDuty] == 1*then
SetPlayerColor(playerid,0xFF66FF00);
format(string, sizeof(string),"[ADMIN]: %s is now on Admin Duty",
ABroadCast(COLOR_LIGHTRED, string, 1),
DutyLabel playerid; = Create3DTextLabel("Admin On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1),
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
else
{
SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
new string[128];
format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
PlayerInfo[playerid][pTogReports] = 1;
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}
Thanks for any help
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41240 -- 41242) : error 001: expected token: ",", but found ";"
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242) : error 029: invalid expression, assumed zero
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242 -- 41243) : error 029: invalid expression, assumed zero
C:\Users\Parent\Downloads\tmp_fm_NGRP2 (2).pwn(41242 -- 41243) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
And this is the scripting of the /aduty command.
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerColor(playerid, 0xFF550000);
new string[128];
PlayerInfo[playerid][pTogReports] = 0;
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (Is Now OOC)", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
if PlayerInfo[playerid][pAdminDuty] == 1*then
SetPlayerColor(playerid,0xFF66FF00);
format(string, sizeof(string),"[ADMIN]: %s is now on Admin Duty",
ABroadCast(COLOR_LIGHTRED, string, 1),
DutyLabel playerid; = Create3DTextLabel("Admin On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1),
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
else
{
SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
new string[128];
format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
PlayerInfo[playerid][pTogReports] = 1;
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}
Thanks for any help