Array index is out of bounds
#5

dont return -1,change IsPlayerNearHouse to:
pawn Код:
stock IsPlayerNearHouse(playerid)
{
    for(new i = 1; i < MAX_HOUSES; i++)
    {
        if(HouseIDTaken[i] && IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ])) return i;
    }
    return 0;
}
and change other loops that are like this:
pawn Код:
for(new i = 0; i < MAX_HOUSES; i++)
to:
pawn Код:
for(new i = 1; i < MAX_HOUSES; i++)
Reply


Messages In This Thread
Array index is out of bounds - by RenSoprano - 22.04.2015, 19:06
Re: Array index is out of bounds - by R0 - 22.04.2015, 19:22
Re: Array index is out of bounds - by Sithis - 22.04.2015, 19:22
Re: Array index is out of bounds - by RenSoprano - 22.04.2015, 19:27
Re: Array index is out of bounds - by R0 - 22.04.2015, 19:42
Re: Array index is out of bounds - by Konstantinos - 22.04.2015, 19:53
Re: Array index is out of bounds - by RenSoprano - 22.04.2015, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)