[Error 047]: array sizes do not match, or destination array is too small @ Rep+++ Everyone
#1

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 !!!
Reply
#2

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);
Reply
#3

Show the checkcoords function
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)