error 047
#1

Strange problem
Код:
error 047: array sizes do not match, or destination array is too small
pawn Код:
if (strcmp(cmd,"/putintrunk", true) == 0)
{
  tmp = strtok(cmdtext,idx);
  for (new i = 0;i < sizeof(Accesory);i ++)
  {
     if(strcmp(tmp,Accesory[i][AccesoryName],true) != 0)
     {
       SendMessage(playerid,60,Accesory[i][AccesoryName],"",""); //Accesory[i][AccesoryName] is the fault
     }
  }
}
pawn Код:
stock SendMessage(playerid,TextID,String1[24],String2[24],String3[24])
even if I use 256 instead of 24 same happens, and I don't get it how to fix it

Thanks,
ArcticFox
Reply
#2

047: Array sizes do not match, or destination array is too small
For array assignment, the arrays on the left and the right side of the
assignment operator must have the same number of dimensions.
In addition:
- for multi-dimensional arrays, both arrays must have the same size;
- for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side. When passing arrays to a function argument, these rules also hold for the array that is passed to the function (in the function call) versus the array declared in the function definition. When a function returns an array, all return statements must specify an array with the same size and dimensions.

Maybe this can help you.
Reply
#3

Fixed it

pawn Код:
stock SendMessage(playerid,TextID,String1[],String2[],String3[])
and not
pawn Код:
stock SendMessage(playerid,TextID,String1[24],String2[24],String3[24])
Thanks for the help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)