SA-MP Forums Archive
Error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error. (/showthread.php?tid=427237)



Error. - MarkyYung - 31.03.2013

Error:
Quote:

array index out of bounds (variable "PlayerInfo")

CODE

Code:
    if(dialogid == 6969)
    {
        if(response) // If they clicked 'Yes' or pressed enter
        {
            SendClientMessage(playerid, COLOR_GREEN, " 10 Weapons package ordered");
 			PlayerInfo[playerid][pFinWeapon][1] = 24;
 			PlayerInfo[playerid][pFinWeapon][2] = 24;
 			PlayerInfo[playerid][pFinWeapon][3] = 24;
 			PlayerInfo[playerid][pFinWeapon][4] = 24;
 			PlayerInfo[playerid][pFinWeapon][5] = 24;
 			PlayerInfo[playerid][pFinWeapon][6] = 24;
 			PlayerInfo[playerid][pFinWeapon][7] = 24;
 			PlayerInfo[playerid][pFinWeapon][8] = 24;
 			PlayerInfo[playerid][pFinWeapon][9] = 24;
 			PlayerInfo[playerid][pFinWeapon][10] = 24;
			PlayerInfo[playerid][pFinAmmo][100] = ammo;
			GivePlayerMoney(playerid,-50000);
        }
        else // Pressed ESC or clicked cancel
        {
            SendClientMessage(playerid, COLOR_RED, "You canceled");
            
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }



Re: Error. - MarkyYung - 01.04.2013

Anyone please?


Re: Error. - Pawnie - 01.04.2013

Show us your enum

PlayInfo enum