[ajuda] infoorg
#1

Criei uma org nova e tб dando um erro:
error: 032: array index out of bounds (variable "InfoOrg")

a linha do erro й format(string, sizeof(string), "Lowriders: %s", InfoOrg[22][Lider]);

comando do erro:
pawn Код:
if (strcmp("/infolider", cmdtext, true, 10) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um admin.");
            return 1;
        }
        SendClientMessage(playerid, COLOR_WHITE, "|______________ Lideres das Organizaзхes ______________|");
        format(string, sizeof(string), "Policia Militar: %s", InfoOrg[1][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "SWAT: %s", InfoOrg[2][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Exйrcito: %s", InfoOrg[3][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Mйdicos: %s", InfoOrg[4][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Aztecas: %s", InfoOrg[5][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Taliban: %s", InfoOrg[6][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Prefeitura: %s", InfoOrg[7][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Hitmans: %s", InfoOrg[8][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Reporteres: %s", InfoOrg[9][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Taxistas: %s", InfoOrg[10][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "FBI: %s", InfoOrg[11][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Cosa Nostra: %s", InfoOrg[12][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Yakuza: %s", InfoOrg[13][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Groove: %s", InfoOrg[14][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Al'qaeda: %s", InfoOrg[15][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Policia Rodoviaria: %s", InfoOrg[16][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Ballas: %s", InfoOrg[17][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Vagos: %s", InfoOrg[18][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Comando Vermelho: %s", InfoOrg[19][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "PCC: %s", InfoOrg[20][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Drifters: %s", InfoOrg[21][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        format(string, sizeof(string), "Lowriders: %s", InfoOrg[22][Lider]);
        SendClientMessage(playerid, COLOR_AZULBB, string);
        return 1;
    }
alguйm sabe o que pode ser?
Reply
#2

Procure no seu GM por new InfoOrg .



Vocк chegarб а linha de declaraзгo da variбvel InfoOrg, nela, aumente o nъmero dentro do primeiro par de colchetes (da esquerda para a direita) em 1 unidade, pois vocк sу criou 1 "org" .



Espero ter ajudado .
Reply
#3

deu certo, muito obrigado. rep+
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)