error 032: array index out of bounds
#1

I get this error on these codes:

Код:
C:\Users\User\Desktop\VL-Roleplay\GTA RP Script Linux\gamemodes\RolePlay.pwn(5941) : error 032: array index out of bounds (variable "CopSkins")
C:\Users\User\Desktop\VL-Roleplay\GTA RP Script Linux\gamemodes\RolePlay.pwn(16274) : error 032: array index out of bounds (variable "CopSkins")
C:\Users\User\Desktop\VL-Roleplay\GTA RP Script Linux\gamemodes\RolePlay.pwn(16279) : error 032: array index out of bounds (variable "CopSkins")
C:\Users\User\Desktop\VL-Roleplay\GTA RP Script Linux\gamemodes\RolePlay.pwn(16283) : error 032: array index out of bounds (variable "CopSkins")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
new CopSkins[][] =
{
    {280},{281},{265},{266},{267},{282},{283},{288},{284},{285}
};

SetPlayerSkin(playerid, CopSkins[0][1]);

if(Player[playerid][SelectingClothes] == 1)
    {
        if(Player[playerid][SelectingClothesType] == 1)
        {
            new ViewingSkin = 0;
            if(clickedid == NSkin)
            {
                ViewingSkin++;
                SetPlayerSkin(playerid, CopSkins[ViewingSkin][1]);
            }
            if(clickedid == PSkin)
            {
                ViewingSkin--;
                SetPlayerSkin(playerid, CopSkins[ViewingSkin][1]);
            }
            if(clickedid == SSkin)
            {
                Player[playerid][DutyClothes] = CopSkins[ViewingSkin][1];
                SetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
                SetPlayerFacingAngle(playerid, Player[playerid][LastA]);
                SetPlayerInterior(playerid, Player[playerid][LastInt]);
                SetPlayerVirtualWorld(playerid, Player[playerid][LastWorld]);
                SetPlayerSkin(playerid, Player[playerid][LastSkin]);
                Player[playerid][SelectingClothesType] = 0;
                Player[playerid][SelectingClothes] = 0;
                SCM(playerid, ADMINBLUE, "Duty Clothes changed!");
                SavePlayerData(playerid);
            }
            if(clickedid == CSkin)
            {
                SetPlayerPos(playerid, Player[playerid][LastX], Player[playerid][LastY], Player[playerid][LastZ]);
                SetPlayerFacingAngle(playerid, Player[playerid][LastA]);
                SetPlayerInterior(playerid, Player[playerid][LastInt]);
                SetPlayerVirtualWorld(playerid, Player[playerid][LastWorld]);
                SetPlayerSkin(playerid, Player[playerid][LastSkin]);
                Player[playerid][SelectingClothesType] = 0;
                Player[playerid][SelectingClothes] = 0;
            }
        }
    }
Reply


Messages In This Thread
error 032: array index out of bounds - by Stefand - 08.06.2013, 07:42
Re: error 032: array index out of bounds - by Giroud12 - 08.06.2013, 07:46
Re: error 032: array index out of bounds - by Vince - 08.06.2013, 09:52
Re: error 032: array index out of bounds - by Stefand - 08.06.2013, 11:53

Forum Jump:


Users browsing this thread: 1 Guest(s)