SA-MP Forums Archive
Array out of bounds? - 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: Array out of bounds? (/showthread.php?tid=567205)



Array out of bounds? - LegendOfScripts - 11.03.2015

../filterscripts/HouseDialogs.pwn(149) : error 032: array index out of bounds (variable "HouseInfo")

anyhelp code.
Код:
#define MAX_FURNITURE 300 //Change this if you want to allow players to have more furniture

enum hInfo
{
	Owned,
	OwnerName[124],
	Rented,
	Type,
	RenterName[124],
	Price,
	RentPrice,
	Locked,
	Int,
	Vw,
	Float:HouseEnterPos[3],
	Float:HouseIntPos[3],
	//Garage will add this in when the vehicle ownership system is done.
	//Furniture
	ObjectID[MAX_FURNITURE],
	Float:ObjectPosX[MAX_FURNITURE],
	Float:ObjectPosZ[MAX_FURNITURE],
	Float:ObjectPosY[MAX_FURNITURE],
	Float:ObjectPosRX[MAX_FURNITURE],
	Float:ObjectPosRY[MAX_FURNITURE],
	Float:ObjectPosRZ[MAX_FURNITURE],
	ObjectVW[MAX_FURNITURE],
	ObjectInt[MAX_FURNITURE]
}
new HouseInfo[MAX_HOUSES][hInfo];

//line error is on
if(HouseInfo[i][ObjectID][MAX_FURNITURE] != 0) return SendClientMessage(playerid, COLOR_RED, "Maxed Furniture Objects planted please remove some!");



Re: Array out of bounds? - LegendOfScripts - 11.03.2015

fixed