error 033: array must be indexed
#4

So, try the code below:

pawn Код:
command(makeowner, playerid, params[])
{
    new Confirm[128], id, string[128], string1[128];
    if(sscanf(params, "dz", id, Confirm))
    {
        if(Player[playerid][FactionRank] == 7 && !strcmp(Factions[Player[playerid][Faction]][FOwner], GetName(playerid), true))
        {
            format(string1, sizeof(string1), "You wanna make %s the owner of your faction? [Yes? Type '/makeowner [id] Confirm'] ", GetName(id));
            SendClientMessage(playerid, WHITE, string1);
        }
    }
    else
    {
        if(Player[playerid][FactionRank] == 7 && !strcmp(Factions[Player[playerid][Faction]][FOwner], GetName(playerid), true))
        {
            format(string, sizeof(string), "Factions/Faction_%d.ini", id);
            if(strcmp(Confirm, "Confirm", true) == 0)
            {
                if(Player[id][Faction] == Player[playerid][Faction])
                {
                    format(Factions[Player[playerid][Faction]][FOwner], 255, "%s", GetName(id));
                    format(string1, sizeof(string1), "You made %s owner of the faction, you are now %s.", GetName(id), Factions[Player[id][Faction]][RankName6]);
                    SendClientMessage(playerid, WHITE, string1);
                    Player[playerid][FactionRank] = 6;
                    format(string1, sizeof(string1), "%s made you owner of the faction, he is now %s.", GetName(playerid), Factions[Player[id][Faction]][RankName6]);
                    SendClientMessage(id, ADMINBLUE, string1);
                    Player[id][FactionRank] = 7;
                    SaveFaction(Player[id][Faction]);
                    SavePlayerData(playerid);
                    SavePlayerData(id);
                }
                else
                {
                    SCM(playerid, RED, "This player is not in your faction.");
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
error 033: array must be indexed - by Stefand - 18.09.2012, 14:59
Re: error 033: array must be indexed - by Jason` - 18.09.2012, 15:01
Re: error 033: array must be indexed - by Stefand - 18.09.2012, 15:06
Re: error 033: array must be indexed - by Jason` - 18.09.2012, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)