SA-MP Forums Archive
What is this?l lol - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is this?l lol (/showthread.php?tid=40940)



What is this?l lol - Martin_Smith - 23.06.2008

how do i fix this?> you got any idea

Код:
			CarInfo[idx][cComp1] = strval(arrCoords[13]);
			CarInfo[idx][cComp2] = strval(arrCoords[14]);
			CarInfo[idx][cComp3] = strval(arrCoords[15]);
			CarInfo[idx][cComp4] = strval(arrCoords[16]);
			CarInfo[idx][cComp5] = strval(arrCoords[17]);
			CarInfo[idx][cComp6] = strval(arrCoords[18]);
			CarInfo[idx][cComp7] = strval(arrCoords[19]);
			CarInfo[idx][cComp8] = strval(arrCoords[20]);
			CarInfo[idx][cComp9] = strval(arrCoords[21]);
			CarInfo[idx][cComp10] = strval(arrCoords[22]);
			CarInfo[idx][cComp11] = strval(arrCoords[23]);
			CarInfo[idx][cComp12] = strval(arrCoords[24]);
			CarInfo[idx][cComp13] = strval(arrCoords[25]);
			CarInfo[idx][cComp14] = strval(arrCoords[26]);
			CarInfo[idx][cComp15] = strval(arrCoords[27]);
			CarInfo[idx][cComp16] = strval(arrCoords[28]);
			CarInfo[idx][cPaintJob] = strval(arrCoords[29]);
i got this error...

Код:
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9964) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9965) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9966) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9967) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9968) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9969) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9970) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9971) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9972) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9973) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9974) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9975) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9976) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9977) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9978) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9979) : error 032: array index out of bounds (variable "arrCoords")
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9980) : error 032: array index out of bounds (variable "arrCoords")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase



Re: What is this?l lol - OKStyle - 24.06.2008

array "arrCoords" too small.

try this:
pawn Код:
new arrCoords[x][y]; // x - amount of line, y - amount data cells (for coordinates - 3)



Re: What is this?l lol - Martin_Smith - 24.06.2008

i added that but got more error:

Код:
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 017: undefined symbol "x"
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 036: empty statement
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
line 9941:
Код:
  new arrCoords[x][y]; // x - amount of line, y - amount data cells (for coordinates - 3)



Re: What is this?l lol - ShizNator - 24.06.2008

Quote:
Originally Posted by Martin_Smith
i added that but got more error:

Код:
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 017: undefined symbol "x"
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : error 036: empty statement
C:\Documents and Settings\Dee\Desktop\RPLS.PWN(9941) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
line 9941:
Код:
  new arrCoords[x][y]; // x - amount of line, y - amount data cells (for coordinates - 3)
LMAO dude you gotta replace x and y with numbers according to how big your array needs to be.


Re: What is this?l lol - Martin_Smith - 24.06.2008

data cells? whats that?


Re: What is this?l lol - OKStyle - 25.06.2008

ex:

pawn Код:
new gSpawnPlaces[11][3] = {
{2023.5385,1110.1602,10.8203}, // 3 - how much coord in line
{2022.1067,1120.1284,10.8203},
{2021.1077,1129.0890,10.8203},
{2021.7477,1139.8138,10.8203},
{2022.1377,1149.5381,10.8203},
{2010.6285,1158.4875,10.8203},
{2010.5150,1168.6525,10.8203},
{2010.2249,1177.9316,10.8203},
{2019.7184,1180.3181,10.8203},
{2019.4359,1168.7561,10.8130},
{2022.6763,1198.5331,10.8203} // 11 - how much lines in array
}



Re: What is this?l lol - maniac001 - 24.07.2009

Код:
public LoadCar()
{
	new arrCoords[30][64];