[Error 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone - 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 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone (
/showthread.php?tid=540357)
[Error 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone -
Adarsh007 - 04.10.2014
Hey Guys ! I am Facing a Error- C:\Users\User\Desktop\Pussy Cat\gamemodes\EDIT.pwn(14633) : error 047: array sizes do not match, or destination array is too small
What Should I Do ? to fix this shit ?
Here is the Line where Error occurs-
Код:
public getCheckpointType(playerID)
{
return checkpointType[playerCheckpoint[playerID]];
}
public checkpointUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
for(new j=0; j < MAX_POINTS; j++)
{
if(isPlayerInArea(i, checkCoords[j]))
{
if(playerCheckpoint[i]!=j)
{
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
}
else
{
if(playerCheckpoint[i]==j)
{
DisablePlayerCheckpoint(i);
playerCheckpoint[i] = 999;
}
}
}
}
}
}
public isPlayerInArea(playerID, Float:data[4])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerID, X, Y, Z);
if(X >= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3])
{
return 1;
}
return 0;
}
The Line 14633 where Error Occurs is
Код:
if(isPlayerInArea(i, checkCoords[j]))
I Will Give REP+ Everyone who will give a Proper Answer and Fix this Shit !!!
Re : [Error 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone -
AmirRFCNR - 04.10.2014
Here must have size:
Код:
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
For Example:
pawn Код:
(playerid, Float:x, Float:y, Float:z, Float:size)
//example
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 1.0);
Re: [Error 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone -
DavidBilla - 04.10.2014
Show the checkcoords function