Error rep if you help me
#1

C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8009) : error 001: expected token: ",", but found "["
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8009) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8009) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8009) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8009) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Код:
CMD:destroyflares(playerid, params[])
{
	if(IsACop(playerid) || AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pAdmin] >= 5) {
		if(IsPlayerInAnyVehicle(playerid) && AdminDuty[playerid] == 0)
			return SendClientMessage(playerid, COLOR_GREY, "You must be on foot to use this command.");

		if(GetPVarInt(playerid, "EventToken") == 1 || (PlayerInfo[playerid][pJailTime] > 0 && PlayerInfo[playerid][pJailed] < 6) && AdminDuty[playerid] == 0)
			return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");

		if(PlayerInfo[playerid][pRank] < 5 && PlayerInfo[playerid][pFaction] != 2 && AdminDuty[playerid] == 0)
			return	SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5 to use this command.");

		new
			szMessage[128];

		for(new i; i < sizeof(g_PoliceFlares); i++) {
8009			DestroyDynamicObject(g_PoliceFlares[i][sObjectID]);
			g_PoliceFlares[i][sX] = 0;
			g_PoliceFlares[i][sY] = 0;
			g_PoliceFlares[i][sZ] = 0;
			g_PoliceFlares[i][sObjectID] = INVALID_OBJECT_ID;
		}
		format(szMessage, sizeof(szMessage), "HQ: All flares have been destroyed by %s.", GetPlayerNameEx(playerid));
		SendLawEnforcementMessage(COLOR_DEPT_RADIO, szMessage);
		SendRadioMessage(3, COLOR_DEPT_RADIO, szMessage);
		SendRadioMessage(5, COLOR_DEPT_RADIO, szMessage);
	} else SendClientMessage(playerid, COLOR_GREY, "You're not a law enforcement officer.");
	return true;
}
Reply
#2

anyone?
Reply
#3

Which one is the 8009 line?

EDIT : never mind i found it.
Reply
#4

So, Can you help me?
Reply
#5

pawn Код:
CMD:destroyflares(playerid, params[])
{
    if(IsACop(playerid) || AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pAdmin] >= 5) {
        if(IsPlayerInAnyVehicle(playerid) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_GREY, "You must be on foot to use this command.");

        if(GetPVarInt(playerid, "EventToken") == 1 || (PlayerInfo[playerid][pJailTime] > 0 && PlayerInfo[playerid][pJailed] < 6) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");

        if(PlayerInfo[playerid][pRank] < 5 && PlayerInfo[playerid][pFaction] != 2 && AdminDuty[playerid] == 0)
            return  SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5 to use this command.");

        new
            szMessage[128];

        for(new i; i < sizeof(g_PoliceFlares); i++)
                {
            DestroyDynamicObject(g_PoliceFlares[i][sObjectID]);
            g_PoliceFlares[i][sX] = 0;
            g_PoliceFlares[i][sY] = 0;
            g_PoliceFlares[i][sZ] = 0;
            g_PoliceFlares[i][sObjectID] = INVALID_OBJECT_ID;
        }
        format(szMessage, sizeof(szMessage), "HQ: All flares have been destroyed by %s.", GetPlayerNameEx(playerid));
        SendLawEnforcementMessage(COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(3, COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(5, COLOR_DEPT_RADIO, szMessage);
    } else SendClientMessage(playerid, COLOR_GREY, "You're not a law enforcement officer.");
    return true;
}
Reply
#6

C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8010) : error 001: expected token: ",", but found "["
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8010) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8010) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8010) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\Marx Realty Roleplay Edited\gamemodes\PRRP.pwn(8010) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Код:
CMD:destroyflares(playerid, params[])
{
    if(IsACop(playerid) || AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pAdmin] >= 5) {
        if(IsPlayerInAnyVehicle(playerid) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_GREY, "You must be on foot to use this command.");

        if(GetPVarInt(playerid, "EventToken") == 1 || (PlayerInfo[playerid][pJailTime] > 0 && PlayerInfo[playerid][pJailed] < 6) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");

        if(PlayerInfo[playerid][pRank] < 5 && PlayerInfo[playerid][pFaction] != 2 && AdminDuty[playerid] == 0)
            return  SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5 to use this command.");

        new
            szMessage[128];

        for(new i; i < sizeof(g_PoliceFlares); i++)
                {
 8010           DestroyDynamicObject(g_PoliceFlares[i][sObjectID]);
            g_PoliceFlares[i][sX] = 0;
            g_PoliceFlares[i][sY] = 0;
            g_PoliceFlares[i][sZ] = 0;
            g_PoliceFlares[i][sObjectID] = INVALID_OBJECT_ID;
        }
        format(szMessage, sizeof(szMessage), "HQ: All flares have been destroyed by %s.", GetPlayerNameEx(playerid));
        SendLawEnforcementMessage(COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(3, COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(5, COLOR_DEPT_RADIO, szMessage);
    } else SendClientMessage(playerid, COLOR_GREY, "You're not a law enforcement officer.");
    return true;
}
Reply
#7

Ignore the previous code, i thought you can make only one at a time, can i see the enumerator of g_PoliceFlares
Reply
#8

I dont have enumerator of Gflares, But i have
new g_PoliceFlares[MAX_PLAYERS];
Reply
#9

I told you to ignore it was a misunderstand, show your g_PoliceFlares enum.
Reply
#10

I edit my message tho'
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)