14.12.2011, 20:41
Hello there,
Ive been out sa-mp and pawno for a while now but since i shortly noticed there was an update (0.3d).
I was planning to restore and update my server.
But im abit struggling with this.
rule 582:
playerinfo[playerid][email] is created here:
please can anyone help me out?
Ive been out sa-mp and pawno for a while now but since i shortly noticed there was an update (0.3d).
I was planning to restore and update my server.
But im abit struggling with this.
Код:
(582) : error 047: array sizes do not match, or destination array is too small
pawn Код:
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;
}
pawn Код:
playerinfo[playerid][email] = inputtext;
pawn Код:
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];