Error Not to Sure Why HELP! -
DJean1 - 03.01.2013
Ok So After Compiling My Script I Added 2 Commands They Seem To Be Fine, But Now I get This Error Please Help me
Код:
Desktop\BBRPAname.pwn(2341) : error 001: expected token: "-identifier-", but found "new"
On Line 2341 is
Код:
new
PlayerCrime[MAX_PLAYERS][pCrime];
Please Help Me
Re: Error Not to Sure Why HELP! -
InfiniTy. - 03.01.2013
What's the line before that?
Re: Error Not to Sure Why HELP! -
DJean1 - 03.01.2013
Heres A Tiny Bit After That Line
Код:
new PlayerHaul[100][pHaul];
enum pCrime
{
pBplayer[32],
pAccusing[32],
pAccusedof[32],
pVictim[32],
new PlayerCrime[MAX_PLAYERS][pCrime];
Re: Error Not to Sure Why HELP! -
aslan890 - 03.01.2013
I thing you need to add ' ; ' on that line
Re : Error Not to Sure Why HELP! -
DaRk_RaiN - 03.01.2013
pawn Код:
enum pCrime
{
pBplayer[32],
pAccusing[32],
pAccusedof[32],
pVictim[32],
};
Re: Error Not to Sure Why HELP! -
DJean1 - 03.01.2013
Ok I Shall Try That Code Now And I Will See What Happens Look For The Edit In This Post to See What Happens
EDIT: Works Fine Im Adding A New Aduty Command To Go With My /setaname Command IF there are any errors i shall post them and please try to help if you can.
Re: Error Not to Sure Why HELP! -
DJean1 - 03.01.2013
Added A New Command Now I Get The Error Below
Код:
CMD:aduty(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 5) {
if(!strcmp(PlayerInfo[playerid][pAdminName], "(null)", true)) {
return SendClientMessage(playerid, COLOR_GREY, "You don't have an admin name set. Contact a Head Admin (or higher) first.");
}
else {
switch(PlayerInfo[playerid][pAdminDuty]) {
case 0: {
Playerinfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
SetPlayerHealth(playerid, 500000.0);
format(szMessage, sizeof(szMessage), "Notice: {FFFFFF}Admin %s (%s) is now on administrative duty.", PlayerInfo[playerid][pAdminName], PlayerInfo[playerid][pNormalName]);
}
case 1: {
PlayerInfo[playerid][pAdminDuty] = 0;
SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
format(szMessage, sizeof(szMessage), "Notice: {FFFFFF}Admin %s (%s) is now off administrative duty.", PlayerInfo[playerid][pAdminName], PlayerInfo[playerid][pNormalName]);
}
}
submitToAdmins(szMessage, COLOR_HOTORANGE);
}
}
return 1;
}
I Now Get This Error
Код:
\BBRPAname2.pwn(37995) : error 017: undefined symbol "Playerinfo"
\BBRPAname2.pwn(37995) : warning 215: expression has no effect
\BBRPAname2.pwn(37995) : error 001: expected token: ";", but found "]"
\BBRPAname2.pwn(37995) : error 029: invalid expression, assumed zero
\BBRPAname2.pwn(37995) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Please help if you can
Re: Error Not to Sure Why HELP! -
Babul - 03.01.2013
in the case 0:, theres a typo, a lowercase "i" instead "I", change
Код:
Playerinfo[playerid][pAdminDuty] = 1;
Код:
PlayerInfo[playerid][pAdminDuty] = 1;
...and see whats happening.
Re: Error Not to Sure Why HELP! -
DJean1 - 03.01.2013
All Fixed And Now I Know Im A Pain i added A New Command /setaname And Now I Get This Error
Код:
C:\Users\Minecraft\Desktop\BBRPAname.pwn(87542) : error 017: undefined symbol "SYNTAX_MESSAGE"
C:\Users\Minecraft\Desktop\BBRPAname.pwn(87542) : warning 215: expression has no effect
C:\Users\Minecraft\Desktop\BBRPAname.pwn(87542) : error 001: expected token: ";", but found ")"
C:\Users\Minecraft\Desktop\BBRPAname.pwn(87542) : error 029: invalid expression, assumed zero
C:\Users\Minecraft\Desktop\BBRPAname.pwn(87542) : fatal error 107: too many error messages on one line
On Line 87542 There Is
Код:
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/setadminname [playerid] [adminname]");
And The Whole Command Is
Код:
CMD:setaname(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 5) {
new
userID,
playerNameString[MAX_PLAYER_NAME];
if(sscanf(params, "us[24]", userID, playerNameString)) {
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/setadminname [playerid] [adminname]");
}
else {
if(!IsPlayerConnected(userID))
return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated.");
if(PlayerInfo[userID][pAdmin] >= 5) {
if(PlayerInfo[userID][pAdmin] > PlayerInfo[playerid][pAdmin]) {
return SendClientMessage(playerid, COLOR_GREY, "You can't change the admin name of a higher level administrator.");
}
else {
new
messageString[128];
format(messageString, sizeof(messageString), "You have changed %s's admin name to %s.", PlayerInfo[userID][pAdminName], playerNameString);
SendClientMessage(playerid, COLOR_WHITE, messageString);
format(messageString, sizeof(messageString), "%s has changed your admin name to %s.", PlayerInfo[playerid][pAdminName], playerNameString);
SendClientMessage(userID, COLOR_WHITE, messageString);
format(PlayerInfo[userID][pAdminName], MAX_PLAYER_NAME, "%s", playerNameString);
if(PlayerInfo[userID][pAdminDuty] >= 1)
SetPlayerName(userID, playerNameString);
return 1;
}
}
else {
return SendClientMessage(playerid, COLOR_GREY, "You can't change a non-admin's admin name.");
}
}
}
return 1;
}
Thanks Alot