
[data] Cash = 0 Score = 0 Lang = 0 Admin = 0 VIP = 0
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Lang",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"VIP",0);
INI_Close(File);
}
}
|
Could you try change the order so password comes after something else and see what happens? Also, don't use udb_hash - it's as good as no hash!
|
|
Why even bother with INT if you can INI_WriteString() and INI_ReadString()? I suggest you to change
INI_WriteInt(File,"Password",udb_hash(inputtext)); with INI_WriteString(File,"Password",inputtext); |
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(inputtext == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
}
return 1;
}
}
...... : error 033: array must be indexed (variable "inputtext")
|
Try with this tutorial!
|
)