error 047: array sizes do not match, or destination array is too small
#1

Hey guys, could any of you help me with these:

pawn Код:
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(4343) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(13756) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(13800) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(21208) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(21298) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\Mike\Desktop\SA-MP\GAMEMO~1\mysql.pwn(23120) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
the following lines:

pawn Код:
4343: stringEX=mysql_GetStr("`business`","`name`",queryEX);
13756: String=mysql_GetStr("vehicles","owner",queryEX);
13800: String=mysql_GetStr("vehicles","owner",queryEX);
21208: stringEX=mysql_GetStr("vehicles","owner",String);
21298: String=mysql_GetStr("vehicles","owner",String);
I did notice that they're all because of mysql_GetStr so here is the stock:

pawn Код:
mysql_GetStr(tab[],col[],line[]){
    format(queryEX,256,"SELECT `%s` FROM `%s` WHERE %s;",col,tab,line);
    mysql_query(queryEX);
    mysql_store_result();
    if(mysql_num_rows()){
        mysql_fetch_row(fresult);
        format(fresult,256,"%s",fresult);
    } else {
        format(fresult,1," ");
    }
    mysql_free_result();
    return fresult;
}
Reply
#2

I really don't know, maybe someone more qualified can help hehe

Good luck!
Reply
#3

ok listen . This might boost your script size a bit but put any cells from 256 to 512 or do the contrary way.

If there are

128 then move them to 256 or 512
If there are 256 move them to 128 or 512
If there are 512 move them to 128 or 256 .

This should fix that.
Reply
#4

Quote:
Originally Posted by melkorhero
I really don't know, maybe someone more qualified can help hehe
Then i don't know why do you bother with posting.

Quote:
Originally Posted by pawn-lang.pdf
Error 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.
Reply
#5

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by melkorhero
I really don't know, maybe someone more qualified can help hehe
Then i don't know why do you bother with posting.

Quote:
Originally Posted by pawn-lang.pdf
Error 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.
I just told them that .. But you explained it in details ^^
Reply
#6

it helped me so much,thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)