SA-MP Forums Archive
Error 032: array index out of bounds (variable "FamInfo") - 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 032: array index out of bounds (variable "FamInfo") (/showthread.php?tid=601850)



Error 032: array index out of bounds (variable "FamInfo") - Sweez - 27.02.2016

Hello guys, i'm using a edit of zGaming, and i want to add more place for cars in the families, because its 5 but i need atleast 10. So i started doing some sh*t, and i got this error:
Код:
C:\Users\User\Desktop\Нова папка (4)\gamemodes\UGRP.pwn(2665 -- 2698) : error 032: array index out of bounds (variable "FamInfo")
So on lines from 2665 to 2698

Код:
	    format(string, sizeof(string), "%d|%s|%s|%d|%s|%d|%f|%f|%f|%d|%d|%d|%d|%s|%s|%s|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\r\n",
		FamInfo[idx][fTaken],
		FamInfo[idx][fName],
		FamInfo[idx][fMOTD],
		FamInfo[idx][fColor],
		FamInfo[idx][fLeader],
		FamInfo[idx][fMembers],
		FamInfo[idx][fSafeX],
		FamInfo[idx][fSafeY],
		FamInfo[idx][fSafeZ],
		FamInfo[idx][fMoney],
		FamInfo[idx][fMats],
		FamInfo[idx][fWeed],
		FamInfo[idx][fcocaine],
		FamInfo[idx][fRank1],
		FamInfo[idx][fRank2],
		FamInfo[idx][fRank3],
		FamInfo[idx][fRank4],
		FamInfo[idx][fRank5],
		FamInfo[idx][fRank6],
		FamInfo[idx][fSkins][0],
		FamInfo[idx][fSkins][1],
		FamInfo[idx][fSkins][2],
		FamInfo[idx][fSkins][3],
		FamInfo[idx][fSkins][4],
		FamInfo[idx][fSkins][5],
		FamInfo[idx][fSkins][6],
		FamInfo[idx][fStrikes],
		FamInfo[idx][fVehType][0], // Veh 1
		FamInfo[idx][fVehType][1], // Veh 2
		FamInfo[idx][fVehType][2], // Veh 3
		FamInfo[idx][fVehType][3], // Veh 4
  		FamInfo[idx][fVehType][4], // Veh 5
  		FamInfo[idx][fVehType][5], // Veh 6
Can someone help me ?


Re: Error 032: array index out of bounds (variable "FamInfo") - Mister0 - 27.02.2016

show how yopu definiet the variable FamInfo, and show all the code you posted


Re: Error 032: array index out of bounds (variable "FamInfo") - Sweez - 27.02.2016

Quote:
Originally Posted by Mister0
Посмотреть сообщение
show how yopu definiet the variable FamInfo, and show all the code you posted
http://pastebin.com/QtzRtvq4


Re: Error 032: array index out of bounds (variable "FamInfo") - SyS - 27.02.2016

Faminfo is 2d array then how can it hold 3 ??