array must be indexed (variable "FactionInfo")
#1

Any ideas how to fix this problem?

pawn Код:
if(FactionInfo[VehicleInfo[i][vFaction]] == PlayerInfo[playerid][pFaction])
Reply
#2

Show your FactionInfo enum/array/variable real quick?
Reply
#3

It's easy to explain I think, all I need to know is the proper sentence...

I want it to be a frespawn command, so it goes like this

pawn Код:
COMMAND:frespawn(playerid, params[])
{
    if(PlayerInfo[playerid][pRank] >= 12)
    {
        if(IsPlayerInAnyFaction(playerid))
        {
            new string[256];
            format(string, sizeof(string), "%s has respawned all unused faction vehicles.");
            SendMessageToSameFaction(string, COLOR_GREY);
            for(new i; i != MAX_VEHICLES; i++)
            {
                new model = GetVehicleModel(i);
                if(CheckVehicleForPassengers(i) == -1 && model != 569 && model != 570 && model != 590 && model != 537 && model != 538)
                {
                    if(FactionInfo[PlayerInfo[playerid][pFaction]][pFaction] == PlayerInfo[playerid][pFaction])
                    {
                        Delete3DTextLabel(veicolo_callsign_testo[i]);
                        DestroyDynamicObject(VehicleInfo[i][vSiren]);
                        SetVehicleDead(i, 1);
                    }
                }
            }
        }
        else return SendClientMessage(playerid, COLOR_GREY, "You must be in a faction to perform this command.");
    }
    SendClientMessage(playerid, COLOR_GREY, "You need to be a high command in order to perform this command.");
    return 1;
}
But the line I send you above it broken.
Reply
#4

I am confused about this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)