11.06.2014, 07:20
Hello, I've trying since last night to fix a bug. The passwords when you register, doesn't save. Don't insert any value.
Parts of code which may contain the bug:
Or this:
Heeelp please D:
Parts of code which may contain the bug:
pawn Код:
function OnPlayerRegister(playerid, inputtext[])
{
if(IsPlayerConnected(playerid))
{
new passita[24];
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
format(passita, sizeof(passita), "%s", inputtext);
printf(passita);
INI_WriteString(File,"Password", passita); //udb INI_WriteInt(File,"Password",udb_hash(password));
INI_Close(File);
TotalRegister++;
SendClientMessageEx(playerid, COLOR_YELLOW, "Cuenta registrada, se ha iniciado sesiуn automбticamente.");
OnPlayerLogin(playerid);
}
return 1;
}
pawn Код:
function LoadUser_pass(playerid,name[],value[])
{
//INI_Int("Password",Info[playerid][pKey]);
INI_String("Password",Info[playerid][pKey], 24);
return 1;
}
pawn Код:
INI_WriteString(File,"Password",Info[playerid][pKey]);
pawn Код:
if( strcmp( key , "Key" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(Info[playerid][pKey], val, 0, strlen(val)-1, 24); }