Account save problem
#7

For example:

pawn Код:
new Array[14] = "RandomLetters";

for(new i = 0; i < 15; i++)
{
    printf("%c", Array[i]);//%c stands for character
    //This will give us something like:
    //Run time error 4: "Array index out of bounds"
    //Accessing element at index 14 past array upper bound 13
}
I found a loop in your code that might be causing this run time error:

pawn Код:
for (new i = 0; i < 13; i++)
{
    GetPlayerWeaponData(playerid, i, myweapons[i][0], myweapons[i][1]);
    if(PlayerInfo[playerid][pGuns][i] == myweapons[i][0])
    {
        PlayerInfo[playerid][pGunAmmo][i] = myweapons[i][1];
            //format(szMessage, sizeof(szMessage), "* %s has ran out of ammo.", GetPlayerNameEx(playerid));//ran out of ammo check
       // ProxDetector(25.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
}
Reply


Messages In This Thread
Account save problem - by IndependentGaming - 25.04.2014, 12:48
Re: Account save problem - by IndependentGaming - 27.04.2014, 10:53
Re: Account save problem - by IndependentGaming - 27.04.2014, 15:58
Re: Account save problem - by IndependentGaming - 27.04.2014, 16:04
Re: Account save problem - by gtakillerIV - 27.04.2014, 16:45
Re: Account save problem - by IndependentGaming - 28.04.2014, 10:46
Re: Account save problem - by gtakillerIV - 28.04.2014, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)