Array index out of bounds
#4

Cant find any soulution yet, does anyone know, I'm sure this is the problem

pawn Код:
if(LiderKupuje[playerid] == true)
    {
        new Keys, ud, lr, str[128], str2[128], ime[25];
        GetPlayerKeys(playerid, Keys, ud, lr); GetPlayerName(playerid, ime, sizeof(ime));

        if(lr > 0)
        {
            Autosalon[playerid]++;
            if(Autosalon[playerid] >= sizeof(OrgVozila)) Autosalon[playerid] = 0;
            DestroyVehicle(IzlozbenoVozilo[playerid]);
            IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
            format(str, sizeof(str), "Vozilo: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
            TextDrawSetString(LiderBuyingVeh0[playerid], str);
            format(str2, sizeof(str2), "Cena: %d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
            TextDrawSetString(LiderBuyingVeh1[playerid], str2);
        }
        else if(lr < 0)
        {
            Autosalon[playerid]--;
            if(Autosalon[playerid] < 0) Autosalon[playerid] = sizeof(OrgVozila)-1;
            DestroyVehicle(IzlozbenoVozilo[playerid]);
            IzlozbenoVozilo[playerid] = CreateVehicle(OrgVozila[Autosalon[playerid]][0], 2148.2092,-1166.2465,23.7537,271.1449, 1, 1, -1);
            format(str, sizeof(str), "Vozilo: %s", ImenaVozila[OrgVozila[Autosalon[playerid]][0]]);
            TextDrawSetString(LiderBuyingVeh0[playerid], str);
            format(str2, sizeof(str2), "Cena: %d", ImenaVozila[OrgVozila[Autosalon[playerid]][1]]);
            TextDrawSetString(LiderBuyingVeh1[playerid], str2);
        }
        if (Keys &  KEY_HANDBRAKE || Keys &  KEY_JUMP )
        {
            DestroyVehicle(IzlozbenoVozilo[playerid]);
            SCM(playerid, WHITE, "Odustali ste od kupovine vozila...");
            TogglePlayerControllable(playerid, 1);
            LiderKupuje[playerid] = false;
            SetCameraBehindPlayer(playerid);
            TextDrawHideForPlayer(playerid, LiderBuyingVeh0[playerid]);
            TextDrawHideForPlayer(playerid, LiderBuyingVeh1[playerid]);
        }
    }
Reply


Messages In This Thread
Array index out of bounds - by ShoortyFl - 30.01.2015, 22:31
Re: Array index out of bounds - by Sime30 - 30.01.2015, 22:40
Re: Array index out of bounds - by ShoortyFl - 30.01.2015, 22:41
Re: Array index out of bounds - by ShoortyFl - 31.01.2015, 01:49
Re: Array index out of bounds - by ShoortyFl - 31.01.2015, 16:30
Re: Array index out of bounds - by ikey07 - 31.01.2015, 16:31
Re: Array index out of bounds - by ShoortyFl - 31.01.2015, 16:41
Re: Array index out of bounds - by ShoortyFl - 31.01.2015, 19:33

Forum Jump:


Users browsing this thread: 2 Guest(s)