SA-MP Forums Archive
error 047: array sizes do not match, or destination array is too small - 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 (/showthread.php?tid=579089)



error 047: array sizes do not match, or destination array is too small - andyandyy8 - 24.06.2015

I receive the following error:
Quote:

Carabines.pwn(1284) : error 047: array sizes do not match, or destination array is too small

Quote:

ptask PLAYERTASK[1000](playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new string[4];
format(string, sizeof(string), "%d", GetPlayerSpeed(playerid));
PlayerTextDrawSetString(playerid, VEHICLE_SPEED_TEXTDRAW[playerid], string);
}
}

PS: I have used y_timers for a long time but this is the first the when i receive an error like this.


Re: error 047: array sizes do not match, or destination array is too small - GTLS - 24.06.2015

On which line do you get error? i mean which is line 1284?


Re: error 047: array sizes do not match, or destination array is too small - andyandyy8 - 24.06.2015

Quote:
Originally Posted by MP2
Посмотреть сообщение
From ******:
Quote:

That error usually occurs when you change "MAX_PLAYERS" after including YSI instead of before, meaning that the different parts of your mode are using different values.

Always re-define MAX_PLAYERS like so:

[pawn]
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 123

// rest of script
[/[pawn]
SOLVED