(582) : error 047: array sizes do not match, or destination array is too small
if(dialogid == REGISTER_DIALOG_3)
{
if(!response)
{
ShowPlayerDialog(playerid,REGISTER_DIALOG_2,DIALOG_STYLE_INPUT,"Dutchtopia RP - Register","Fill in your Roleplay lastname:","Next","Back");
return 1;
}
if(!strlen(inputtext) || strlen(inputtext) > 64)
{
SendClientMessage(playerid, COLOR_RED, ">> No email adress found or is longer then 64 characters!");
ShowPlayerDialog(playerid,REGISTER_DIALOG_3,DIALOG_STYLE_INPUT,"Dutchtopia RP - Register","Fill in your email adress:","Finish","Back");
return 1;
}
playerinfo[playerid][email] = inputtext;
new Query[256], playerip[15];
GetPlayerIp(playerid,playerip,15);
format(Query, sizeof(Query), "INSERT INTO users (username, password, email, firstname, lastname, regsince, lastlogin, IP) VALUES ('%s', '%s', '%s', '%s', '%s', current_date(), now(), '%s')",playerinfo[playerid][name],playerinfo[playerid][pwhash],playerinfo[playerid][email],playerinfo[playerid][firstname],playerinfo[playerid][lastname],playerip);
mysql_query(Query); //sends Query to the database
ShowPlayerDialog(playerid,false,DIALOG_STYLE_MSGBOX,"Dutchtopia RP - Register","Succesfully registered. Enjoy your time in San Fiero!","Finish","");
playerinfo[playerid][loggedin] = true;
}
playerinfo[playerid][email] = inputtext;
enum pinfo
{
name[MAX_PLAYER_NAME],pwhash[34],money,jailed,loggedin,pm,pfuel,timer1,music,admin,mod,bounty,mysqlid,transfer,
lastlogin[64],email[128],firstname[64],lastname[64],regsince[64],job,xp,duty,checkpoint,jobdim,IP[16]
};
new playerinfo[MAX_PLAYERS][pinfo];
format(playerinfo[playerid][email], 128, "%s", inputtext);
Try
pawn Код:
|
format(playerinfo[playerid][email], 128, inputtext);
format(playerinfo[playerid][email], 128, inputtext);
Why would you make it longer when you can simply do:
pawn Код:
|
Because i have always done it that way and no one (until now) told me any other way
|
Well thanks anyways
![]() this helps allot im currently updating and optimizing very old coding and this helps in multiple places. |
strmid(playerinfo[playerid][email], inputtext, 0, strlen(inputtext));