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

Well, after creating my interiors, I encountered another problem : owner name.

In my enum, I created the mProprio like that

PHP код:
enum mInfo
{
   
mProprio[MAX_PLAYER_NAME+1];
}; 
And when I use this var, i have the error 047

Here is the code

PHP код:

#define MAISON_DEFAULTP "Agence immobiliиre"
// My error codes
InfoMaison[i][mProprio] = MAISON_DEFAULTP;
mysql_get_field("proprio"propname); // In my database, the column proprio is a varchar(31)
InfoMaison[idx][mProprio] = propname// Error here
InfoMaison[idx][mProprio] = propname// Propname is the same var as before
new pname[MAX_PLAYER_NAME+1];
GetPlayerName(playeridpnameMAX_PLAYER_NAME+1);
InfoMaison[i][mProprio] = pname// Error there 
Someone has an idea ?
Thanks in advance
Reply
#2

Remove the ';' from `mProprio` in your enum `mInfo`
Reply
#3

pawn Код:
strcat( (InfoMaison[idx][mProprio][0]='\0',InfoMaison[idx][mProprio]), propname, MAX_PLAYER_NAME+1);
Reply
#4

pawn Код:
mysql_get_field("proprio", InfoMaison[idx][mProprio]); // In my database, the column proprio is a varchar(31)

//Deleted that proprname thing

new pname[MAX_PLAYER_NAME+1], str[64];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME+1);
format(str,sizeof(str),"%s",pname);
InfoMaison[i][mProprio] = str; //Replaced
Try that and see if it works

Edit: after finishing the code, I realized that BlackCode's one might be right, still try it just in case
Reply
#5

I failed when copying the code, it's not a semicolon, it's a comma, don't worry about it

EDIT :

@RealHobo009 Already tried, already failed

@Jeff will try tomorrow, i'm quite tired now (GMT +1, Paris)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)